feat(isp): allow ccm to bypass shadow register

This commit is contained in:
armando
2025-12-16 14:24:40 +08:00
parent 164b5475aa
commit 1d852ef4ea
4 changed files with 24 additions and 10 deletions
@@ -1994,21 +1994,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;
}