If you disable the interrupts before deepsleep to prevent "wonky" interrupt behavior, it will also prevent the wakeup interrupts from firing as well.
Check your HandleLowPower.c file.
Try using CyEnterCriticalSection() and CyExitCriticalSection(). (Not one hundred percent it will work, but iirc it should)
Otherwise, you will probably need to disable the ISRs you don't want firing directly rather than doing a global disable.
Thanks for reply Pratt, I have alo tried code using CyEnterCriticalSection() and CyExitCriticalSection() but it won't work
I tested your attached project on my pioneer kit with CySmart 1.2 and was not able to reproduce the issue.
Can you please let us know the steps to reproduce the issue?
Have you tested the project in pioneer kit or Custom board? If the issue is only in Custom board , then the problem may be on the PCB design.
Also please try keeping Bless interrupt high priority (number 0) in .cydwr of the project and try.
Thanks & Regards,
Hi Anjana / Pratt,
I have a simliar issue when using CYBLE-214009-EVAL. I am developing a sensor which initially connects fine to an Android app (both Cypress CySmart & my own app) but then drops the signal after ~4 seconds. Reading various articles, I understand that this is due to the Cypress BLE chip going into DeepSleep which essentially kills the existing Bluetooth connection?
What is the cleanest way to ensure that the device stays connected, and then just wakes up (keeps / re-establishes the connection) so that it continues to display information from the sensor via the app?
Thanks in advance.
If you setup the hardware/software correctly, it will not lose connection upon sleep/deep sleep modes. The BLE chip will still function at those power levels if desired :)
One method of testing would be to comment out the power mode (sleeping functionality) to see if it is really the sleep portion of the project causing the issue.
Deep sleep should work fine for your application; Try changing what you are doing in the code you add? It sounds like that is the culprit from your descriptions in your original post. If the example project is working until you add your code, then the problem is quite possibly the code you added. :)
Another thing to keep in mind, is that the chip only wakes upon certain interrupts (mostly hardware components, and WDTs), and will run starting immediately after the deepsleep/sleep function call. This means that if you are returning to deep sleep after running through main only once, it could be that you have more processing/things you need to handle before call deepsleep? Or you may need to call cyprocessevents() more frequently depending on what BLE functions you are calling?
Here is a similar thread if you want more reading material: http://www.cypress.com/forum/psoc-4-ble/ble-connection-deep-sleep
E.pratt is correct. If possible, share your project and steps to reproduce. So that we can look into it.
Also, as you are using EzBle module, please make sure you have set the ECO capacitor trim value correctly as in the following KBA: http://www.cypress.com/knowledge-base-article/eco-capacitance-trim-values-ez-ble-modules-kba218990
If you still facing issues of disconnection, please provide us the steps to reproduce issue.
Thanks for your reply, problem was with antenna section of the PCB, it has been solved with the new PCB.