I am using a cyble212020. The device has a single button that is used to put the micro in deepsleep and wakeup. The button generates an interrupt to wakeup the micro. The code has a timer counter and an isr routine to handle timer functions and led con

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

cross mob
LaFo_1751236
Level 1
Level 1
5 replies posted Welcome! First question asked

I am using a cyble212020.  The device has a single button that is used to put the micro in deepsleep and wakeup.  The button generates an interrupt to wakeup the micro.  The code has a timer counter and an isr routine to handle timer functions and led controls.  About 1 in 10 times after wakeup from deepsleep the code will hang in isr_1.  Using timer_1_clearinterrupt to clear in the isr and in the wakeup code.  Tried many things to get it running but no luck so far.  Thanks

0 Likes
1 Solution

Hello,

There are a few changes that needs to be done :

1. Do not call any BLE related API before calling CyBle_Start() in the bootloader project.

2. The BLESS and the system will wakeup from DeepSleep for every advertisement and connection event interrupt.

3. For proper handling of the BLE and system low power modes, please refer to this AN : http://www.cypress.com/file/140991/download

4. Do not use any blocking functions like delay function or flash write in BLE applications.

-Sayani.

View solution in original post

0 Likes
4 Replies
SayaniS_66
Moderator
Moderator
Moderator
10 likes received First like received

Hello,

Are you clearing the pin interrupt as the pin interrupt is waking up the module from DeepSleep. Also, have you placed the code to handle the low-power transitions in a critical section.

Can you share your project so that we can look at it closely.

-Sayani.

0 Likes

Hello,  Thanks for the reply. 

I am clearing the pin interrupt.  Yes the low power code is in a critical section.  Here is my project.

0 Likes

Hello,

There are a few changes that needs to be done :

1. Do not call any BLE related API before calling CyBle_Start() in the bootloader project.

2. The BLESS and the system will wakeup from DeepSleep for every advertisement and connection event interrupt.

3. For proper handling of the BLE and system low power modes, please refer to this AN : http://www.cypress.com/file/140991/download

4. Do not use any blocking functions like delay function or flash write in BLE applications.

-Sayani.

0 Likes