Hello,
I am trying to make a beacon start advertising on a long press of a button. Using this as a reference, I implemented a timer as follows:
this is the flag to keep track of advertising status-
this is the handler and timer creation/start-
Note that, I am using m_timer_id which is a repeated timer for some other purpose. The timer used for the button is m_timer_b which is a single shot timer.
I even made changes in the softdevice event handler-
What I have observed is that, when i press and hold the button, both LED! and LED3 flash once and the board does not do anything
(I'm assuming the device reset?.If so, i dont understand why, i assumed using the flag fixes the advertising while already advertising problem ).
But when i hold the button even after those 2 LEDs have flashed, the device works as required while i keep the button pressed.
I am using the nRF52832 development board, nRF5 SDK11.0 and keil uvision5
Any solutions to this would be appreciated.
Thank you.