I am Trying to Broadcast a single(only one) Packet using Psoc 4 Module in CY8CKIT-042 BLE Kit.
set time out 1Sec (which is min).
advertinging interval = 1000ms(min) and 1000ms(max).
after wake up using switch it should broadcast a sinlge packet with data as 5 in it. and goes to DeepSleep Mode.
but broadcast 2 packets after wakeup.
even if i set time out 1 Sec and advertising interval = 500ms(min) and 500ms(max).(Expected packets 2)
then it broadcast 3 Packtets with data as 5 in it.
evertime it is broadcasting one more packet than expected.
My aim is to broadcast only a single packet.
i have attached my project for reference.
Thanks and Regards
Too many things to be fixed in your project.
1. You have defined two ISR addresses
ISR_WDT_StartEx(WDT_handler) and ISR_WDT_StartEx(IST_WDT).
There is only one interrupt but you have given two parameters in consecutive statements.By doing so the first one i.e WDT_handler is overwritten
You shouldn't do that.
Use only one of these and find the interrupt source as I did in the attached project.
This is the main reason why you are not getting WDT_handler
2) CybleAdvUpdate() API is modified in latest creator version 3.1 SP2. As the behaviour is still under review, inorder to avoid modifying the code for next version of creator I have changed the logic.
I have tested the project. Now the project will transmit once in all channels and go to sleep for 8 sec. It wake up when WDT interrupts ,measure the voltage and transmit it in all channels and then stop adv after 1 sec. This process continues.
Try this project and let me know if you have any other queries.
Update the PSOC creator to 3.1 SP2 version before testing this project.