|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD |
| 2 | + * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: Apache-2.0 |
5 | 5 | */ |
@@ -137,6 +137,55 @@ static inline void pau_ll_clear_regdma_backup_error_intr_state(pau_dev_t *dev) |
137 | 137 | dev->int_clr.error_int_clr = 1; |
138 | 138 | } |
139 | 139 |
|
| 140 | + |
| 141 | +/** |
| 142 | + * @brief Set the maximum number of linked lists supported by REGDMA |
| 143 | + * @param count: the maximum number of regdma link |
| 144 | + */ |
| 145 | +static inline void pau_ll_set_regdma_link_count(int count) |
| 146 | +{ |
| 147 | + HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.backup_dma_cfg0, branch_link_length_aon, count); |
| 148 | +} |
| 149 | + |
| 150 | +/** |
| 151 | + * @brief Set the maximum number of times a single linked list can run for REGDMA. If a linked list continuously reads in a loop |
| 152 | + * for some reason and the execution count exceeds this configured number, a timeout will be triggered. |
| 153 | + * @param count: the maximum number of loop |
| 154 | + */ |
| 155 | +static inline void pau_ll_set_regdma_link_loop_threshold(int count) |
| 156 | +{ |
| 157 | + HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.backup_dma_cfg1, link_work_tout_thres_aon, count); |
| 158 | +} |
| 159 | + |
| 160 | +/** |
| 161 | + * @brief Set the timeout duration for accessing registers. If REGDMA encounters bus-related issues while accessing |
| 162 | + * registers and gets stuck on the bus, a timeout will be triggered. |
| 163 | + * @param count: the maximum number of time |
| 164 | + */ |
| 165 | +static inline void pau_ll_set_regdma_link_reg_access_tout_threshold(int count) |
| 166 | +{ |
| 167 | + HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.backup_dma_cfg1, link_backup_tout_thres_aon, count); |
| 168 | +} |
| 169 | + |
| 170 | +/** |
| 171 | + * @brief Set the regdma_link_addr |
| 172 | + * @param addr: the addr of regdma_link |
| 173 | + */ |
| 174 | +static inline void pau_ll_set_regdma_link_addr(uint32_t addr) |
| 175 | +{ |
| 176 | + HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.backup_dma_cfg2, link_addr_aon, addr); |
| 177 | +} |
| 178 | + |
| 179 | +static inline void pau_ll_set_regdma_link_wait_retry_count(int count) |
| 180 | +{ |
| 181 | + HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.backup_dma_cfg1, link_wait_tout_thres_aon, count); |
| 182 | +} |
| 183 | + |
| 184 | +static inline void pau_ll_set_regdma_link_wait_read_interval(int interval) |
| 185 | +{ |
| 186 | + HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.backup_dma_cfg0, read_interval_aon, interval); |
| 187 | +} |
| 188 | + |
140 | 189 | #ifdef __cplusplus |
141 | 190 | } |
142 | 191 | #endif |
0 commit comments