This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

device get hanged. while sense_level_toggle

Hi

In my case i have gpio interrupt for every 25ms. so i change button detection delay t0 10ms.

and i given timeout in all while loops of twi_hw_master.c.

but my device is hanging some point of time.

when i stop debugging while device is hanged.

my cursor pointing to function sense_level_toggle which is called from GPIOTE_irqhandler().

is button detection delay or timeout will cause for hanging or not.

Kindly suggest us.

Regards Balaji

  • It's not easy to say for sure what the cause of this may be, but have you profiled how long time whatever it is you're doing on a GPIO toggle takes? If you have a GPIO toggle every 25 ms, and whatever action you take there takes close to 25 ms, you will have problems, since the GPIO interrupt will seem to be almost continuously triggered. Remember that the softdevice will most likely also take some run-time between GPIO interrupts, depending on your connection interval and similar.

    If you're not able to solve this problem, could you please share your complete project, so that I can run it here and test? Feel free to create a support case if you need confidentiality for your code.

Related