Determining what interrupt woke me up from sleep

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

I see that my device wakes up from sleep before the WDT interrupt.

how can i determine the source of the interrupt that caused the wakeup?

I used CyBle_Stop(); before entering sleep. So i guess it is not BLE, or can psoc fail enetering sleep even if BLE has stopped?

thanks.

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

In the firmware, if we set a flag in the different interrupt ISR handler functions then we can get to know which interrupt wakes up the device.

CyBle_Stop() function stops any ongoing operation in the BLE Stack and forces the BLE Stack to shut down. So if we stop the BLE before entering into sleep then BLE interrupt won't be produced.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
2 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

In the firmware, if we set a flag in the different interrupt ISR handler functions then we can get to know which interrupt wakes up the device.

CyBle_Stop() function stops any ongoing operation in the BLE Stack and forces the BLE Stack to shut down. So if we stop the BLE before entering into sleep then BLE interrupt won't be produced.

Thanks,

P Yugandhar.

0 Likes
lock attach
Attachments are accessible only for community members.
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Please refer the below attached project where the device enters into sleep mode after stopping the BLE (by calling CyBle_Stop()) and WDT interrupt is used which will enable the system and starts BLE. We can see the code flow in the TERA_TERM where UART is used for printing the statements.

Thanks,

P Yugandhar.

0 Likes