RAKWireless / RAK-STM32-RUI

RUI3 BSP for RAK3172 modules
Other
24 stars 15 forks source link

system_powersave example wakeup from pin WB01 seems not working #4

Open davoodnasehi opened 2 years ago

davoodnasehi commented 2 years ago

Hi Champs, refering to the System_Powersave Arduino example, and this line : api.system.sleep.setup(RUI_WAKEUP_FALLING_EDGE, WB_IO1); I would expcet the CPU to wake up from sleep.all(10000) and print the millis(). Looking at the power profiler kit's power consumption, I feel like activation of Falling edge on WB01 wakes up the CPU, but the expectation is that as per the example code, when wakes up, the serial.print will print the millis. but this doesn't happen and the code still prints the millis() every 10000ms no matter the hardware interrupt has waken the CPU up. Is there any improvement to the code to enable the wakeup in arduino

davoodnasehi commented 2 years ago

I also noticed, without specifying time for sleep, hardware interrupt wakes the cpu up and works correctly, but when we specify the time, the hardware interrupt call back wake up is not functioning as expected