mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/wait_efuse_idle_after_wake_v5.2' into 'release/v5.2'
fix(esp_hw_support): wait eFuse controller idle after sleep wakeup (v5.2) See merge request espressif/esp-idf!31950
This commit is contained in:
commit
45aee0dac3
@ -346,6 +346,9 @@ uint32_t pmu_sleep_start(uint32_t wakeup_opt, uint32_t reject_opt, uint32_t lslp
|
|||||||
|
|
||||||
bool pmu_sleep_finish(void)
|
bool pmu_sleep_finish(void)
|
||||||
{
|
{
|
||||||
|
// Wait eFuse memory update done.
|
||||||
|
while(efuse_ll_get_controller_state() != EFUSE_CONTROLLER_STATE_IDLE);
|
||||||
|
|
||||||
return pmu_ll_hp_is_sleep_reject(PMU_instance()->hal->dev);
|
return pmu_ll_hp_is_sleep_reject(PMU_instance()->hal->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,15 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
EFUSE_CONTROLLER_STATE_RESET = 0, ///< efuse_controllerid is on reset state.
|
||||||
|
EFUSE_CONTROLLER_STATE_IDLE = 1, ///< efuse_controllerid is on idle state.
|
||||||
|
EFUSE_CONTROLLER_STATE_READ_INIT = 2, ///< efuse_controllerid is on read init state.
|
||||||
|
EFUSE_CONTROLLER_STATE_READ_BLK0 = 3, ///< efuse_controllerid is on reading block0 state.
|
||||||
|
EFUSE_CONTROLLER_STATE_BLK0_CRC_CHECK = 4, ///< efuse_controllerid is on checking block0 crc state.
|
||||||
|
EFUSE_CONTROLLER_STATE_READ_RS_BLK = 5, ///< efuse_controllerid is on reading RS block state.
|
||||||
|
} efuse_controller_state_t;
|
||||||
|
|
||||||
// Always inline these functions even no gcc optimization is applied.
|
// Always inline these functions even no gcc optimization is applied.
|
||||||
|
|
||||||
/******************* eFuse fields *************************/
|
/******************* eFuse fields *************************/
|
||||||
@ -175,6 +184,11 @@ __attribute__((always_inline)) static inline void efuse_ll_set_pwr_off_num(uint1
|
|||||||
EFUSE.wr_tim_conf2.pwr_off_num = value;
|
EFUSE.wr_tim_conf2.pwr_off_num = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((always_inline)) static inline uint32_t efuse_ll_get_controller_state(void)
|
||||||
|
{
|
||||||
|
return EFUSE.status.state;
|
||||||
|
}
|
||||||
|
|
||||||
/******************* eFuse control functions *************************/
|
/******************* eFuse control functions *************************/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user