Tool/software:
Hi,
My customer tried to modify the power test to use Power_idleFunc to enter deep sleep mode like motion demo, but fail to continuously wake up from deep sleep mode.
I tried similar modification and found the device has waken up from deep sleep mode, but then enters hard fault after 2nd time wake up. Pls find snapshot below.
Pls find my modification code at https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/1023/power_5F00_modes_5F00_xwrL64xx_2D00_evm_5F00_m4fss0_2D00_0_5F00_freertos_5F00_ti_2D00_arm_2D00_clang.7z.
Would you pls help to check what is missed?
I tried to add a while loop before Power_disablePolicy() (just wake up from deep sleep mode) and connect CCS to change the value of loop from 1 to 0, then the code can enter deep sleep mode for multi times.
I also tried to only fix the sel=1 (add line 121) and comment 119 line in the default power test code (no other changes), but also saw hard fault.
Is there any timing relationship between Power_enablePolicy()/xSemaphoreTake(gPowerSem, SLEEP_TIME_TICKS)/Power_idleFunc?
Why calling xSemaphoreTake(gPowerSem, SLEEP_TIME_TICKS) can enter deepsleep mode? How it call vPortSuppressTicksAndSleep?
Why in motion and presence detection demo it sets a long delay in xSemaphoreTake(gPowerSem, portMAX_DELAY) and use Power_idleFunc to enter deep sleep mode but not use xSemaphoreTake(gPowerSem, SLEEP_TIME_TICKS) directly?
Thanks,
Chris