fix(security): Update key manager specific initializations for esp32c5

This commit is contained in:
Aditya Patwardhan
2024-10-01 22:10:57 +05:30
committed by Mahavir Jain
parent e5d246ef27
commit 82db0feab2
7 changed files with 27 additions and 48 deletions

View File

@@ -67,7 +67,10 @@ static inline void _key_mgr_ll_enable_peripheral_clock(bool enable)
#define key_mgr_ll_enable_peripheral_clock(...) (void)__DECLARE_RCC_ATOMIC_ENV; _key_mgr_ll_enable_peripheral_clock(__VA_ARGS__)
/**
* @brief Reset the Key Manager peripheral */
* @brief Reset the Key Manager peripheral
* Note: Please use key_mgr_ll_reset_register which requires the critical section
* and do not use _key_mgr_ll_reset_register
*/
static inline void _key_mgr_ll_reset_register(void)
{
PCR.km_conf.km_rst_en = 1;

View File

@@ -68,8 +68,11 @@ static inline __attribute__((always_inline)) void mspi_ll_enable_bus_clock(bool
*/
static inline __attribute__((always_inline)) void _mspi_timing_ll_reset_mspi(void)
{
PCR.mspi_conf.mspi_rst_en = 1;
PCR.mspi_conf.mspi_rst_en = 0;
PCR.mspi_clk_conf.mspi_axi_rst_en = 1;
PCR.mspi_clk_conf.mspi_axi_rst_en = 0;
// Wait for mspi to be ready
while (!PCR.mspi_conf.mspi_ready) {
};
}
#ifdef __cplusplus