ulp: fix incorrect bit-width operator while reading RTC_CNTL_LOW_POWER_ST_REG during wakeup
This commit fixes a bug wherein an incorrect bit-width of 0 was being used while reading the RTC_CNTL_LOW_POWER_ST_REG in ulp_fsm example code while judging whether the system is ready for wakeup. The correct value should be a bit-width of 1 to read bit#27 (RTC_CNTL_MAIN_STATE_IDLE) of the RTC_CNTL_LOW_POWER_ST_REG register on esp32.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
wake_up:
|
||||
/* Check if the system is in sleep mode */
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
READ_RTC_REG(RTC_CNTL_LOW_POWER_ST_REG, 27, 0)
|
||||
READ_RTC_REG(RTC_CNTL_LOW_POWER_ST_REG, 27, 1)
|
||||
#else
|
||||
READ_RTC_FIELD(RTC_CNTL_LOW_POWER_ST_REG, RTC_CNTL_MAIN_STATE_IN_IDLE)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user