File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ esp_err_t ulp_riscv_run(void)
32
32
#if CONFIG_IDF_TARGET_ESP32S2
33
33
/* Reset COCPU when power on. */
34
34
SET_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_SHUT_RESET_EN );
35
- esp_rom_delay_us (20 );
36
- CLEAR_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_SHUT_RESET_EN );
37
35
38
36
/* The coprocessor cpu trap signal doesnt have a stable reset value,
39
37
force ULP-RISC-V clock on to stop RTC_COCPU_TRAP_TRIG_EN from waking the CPU*/
@@ -57,8 +55,6 @@ esp_err_t ulp_riscv_run(void)
57
55
#elif CONFIG_IDF_TARGET_ESP32S3
58
56
/* Reset COCPU when power on. */
59
57
SET_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_SHUT_RESET_EN );
60
- esp_rom_delay_us (20 );
61
- CLEAR_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_SHUT_RESET_EN );
62
58
63
59
/* The coprocessor cpu trap signal doesnt have a stable reset value,
64
60
force ULP-RISC-V clock on to stop RTC_COCPU_TRAP_TRIG_EN from waking the CPU*/
Original file line number Diff line number Diff line change @@ -31,11 +31,8 @@ void ulp_riscv_shutdown(void)
31
31
/* Setting the delay time after RISCV recv `DONE` signal, Ensure that action `RESET` can be executed in time. */
32
32
REG_SET_FIELD (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_SHUT_2_CLK_DIS , 0x3F );
33
33
34
- /* suspends the ulp operation*/
35
- SET_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_DONE );
36
-
37
- /* Resets the processor */
38
- SET_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_SHUT_RESET_EN );
34
+ /* Suspends the ulp operation and reset the ULP core. Must be the final operation before going to halt. */
35
+ SET_PERI_REG_MASK (RTC_CNTL_COCPU_CTRL_REG , RTC_CNTL_COCPU_DONE | RTC_CNTL_COCPU_SHUT_RESET_EN );
39
36
40
37
while (1 );
41
38
}
You can’t perform that action at this time.
0 commit comments