I am trying to broadcast custom data for say 10 Sec and then go to deep sleep mode.
then Wake the after 8 Sec using WDT (counter 2) and then start broadcasting. continue doing the same forever.
but in the first time it broadcast for 10 sec. after timeout period. it go to Deepsleep mode. wakeup after 8 Sec( confirmed by toogling BLue LED in WDT ISR).
but does not Advertise furthur...
suggestions are most welcome.
i am attaching my project for Reference.
Solved! Go to Solution.
In your project you are not starting the advertisement after WDT interrupt
use api CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST) to start advertisement.
Eventhhough i write CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST); at the end of ISR it doesnt start advertisng.
Also there is no need to write it in the isr, because control should return to the point where i had left after executing the isr and continue normal operation. in that case it should advertise.
Finally your attachment is the answer to my problems. I have been searching for a solution for weeks. One thing I noted however, in the code below, when I comment out the commented bit, it works. Without commenting it out however, my system always stays in advertising mode. Is the a reason for this? I do not really understand it.
else if(blessState != CYBLE_BLESS_STATE_EVENT_CLOSE)
/* If BLESS is active, then configure PSoC 4 BLE system in
* Sleep mode (~1.6mA current consumption) */
Thanks for your help.