cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

D_Sd_3235936
New Contributor II

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

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

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
Yugandhar
Moderator
Moderator

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