feat(isp): allow ccm to bypass shadow register

This commit is contained in:
armando
2025-12-11 10:24:31 +08:00
parent a01961b74e
commit 4f660e5ee1
4 changed files with 25 additions and 11 deletions
+14 -8
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -1965,21 +1965,27 @@ static inline bool isp_ll_shadow_update_wbg(isp_dev_t *hw)
/**
* @brief Update CCM shadow register
*
* @param[in] hw Hardware instance address
* @param[in] hw Hardware instance address
* @param[in] force_update Force update
* @return
* - True if update is successful, False otherwise
*/
static inline bool isp_ll_shadow_update_ccm(isp_dev_t *hw)
static inline bool isp_ll_shadow_update_ccm(isp_dev_t *hw, bool force_update)
{
//only valid when ISP_SHADOW_MODE_UPDATE_ONLY_NEXT_VSYNC
HAL_ASSERT(hw->shadow_reg_ctrl.shadow_update_sel == ISP_SHADOW_MODE_UPDATE_ONLY_NEXT_VSYNC);
if (hw->shadow_reg_ctrl.ccm_update == 1) {
return false;
}
if (force_update) {
//don't care shadow register
hw->shadow_reg_ctrl.ccm_update = 1;
} else {
if (hw->shadow_reg_ctrl.ccm_update == 1) {
return false;
}
//self clear when ISP_SHADOW_MODE_UPDATE_ONLY_NEXT_VSYNC
hw->shadow_reg_ctrl.ccm_update = 1;
//self clear when ISP_SHADOW_MODE_UPDATE_ONLY_NEXT_VSYNC
hw->shadow_reg_ctrl.ccm_update = 1;
}
return true;
}