cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

LaFo_1751236
New Contributor

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

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

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
LaFo_1751236
New Contributor

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

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