Clearing a register from the main program
Posted: Wed May 22, 2019 11:03 pm
I need to stop an ULP program from running from the main program. According to the documentation:
"To disable the timer (effectively preventing the ULP program from running again), clear the RTC_CNTL_ULP_CP_SLP_TIMER_EN bit in the RTC_CNTL_STATE0_REG register. This can be done both from ULP code and from the main program."
I know how to do it in the ULP program itself
However, as I said I need to disable it from the main sketch. How do I do it?
Thanks.
"To disable the timer (effectively preventing the ULP program from running again), clear the RTC_CNTL_ULP_CP_SLP_TIMER_EN bit in the RTC_CNTL_STATE0_REG register. This can be done both from ULP code and from the main program."
I know how to do it in the ULP program itself
Code: Select all
WRITE_RTC_FIELD(RTC_CNTL_STATE0_REG, RTC_CNTL_ULP_CP_SLP_TIMER_EN, 0)
Thanks.