Hi,
I am developing a code in which, among other things, when a button is pressed, a led turns on. In the same button handler, a timer is started to turn the led off a bit later.
It works perfectly well in the beginning, but after pushing the button some times (between 3 and 10) it responds no more. The rest of the application will continue acting normally, even its timers.
I've already checked that APP_TIMER_CONFIG_OP_QUEUE_SIZE is big enough, and also changing the button handler for a flag and handle the event in the main loop. It solved nothing. The only way it works is by changing the timer by a delay, but it is useless if I want the led to be on for some seconds.
Button initialization and handler:
Timer handler:
I am using a nrf52832 with SDK 14.2.0 and softdevice s132 v5.1.
Any clue of why it is happening or how can be solved will be very welcome. Thanks.