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

Is it wrong to send a characteristic notification from inside a timer callback function?

In my application I send a characteristic notification from inside a timer callback function. This causes a restart of my application if I am connected to the board. But my application does not restart if I am not connected. What is happening?

Is it wrong to send a characteristic notification from inside a timer callback function?

Parents
  • No it's fine to send a characteristic notification from inside a timer callback function. As long as the interrupt context you are in is less than the SVC call interrupt priority, it's fine. So either that's not the case and you need to lower the timer interrupt priority, or you are getting an error return from one of your functions, tripping the APP_ERROR_CHECK() and that's what's actually restarting the board.

Reply
  • No it's fine to send a characteristic notification from inside a timer callback function. As long as the interrupt context you are in is less than the SVC call interrupt priority, it's fine. So either that's not the case and you need to lower the timer interrupt priority, or you are getting an error return from one of your functions, tripping the APP_ERROR_CHECK() and that's what's actually restarting the board.

Children
Related