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

Unable to perform UART transfer on every Timer Interrupt

Hi All,

I am using nRF51422DK with SDK 10 and trying to communicate with an external peripheral over UART at every timer interrupt.

I have modified the ble_app_hrs example so that whenever application timer generates an event I send UART command, wait for response (approx 150 ms) and then try to receive the bytes.

To check my UART communication works fine, I performed a set of UART communication before initializing the timer and ble stack. I am able to send and receive data as desired. UART interrupt is enabled to notify completion of TX and RX data

However, when I perform the same routine within the timer event handler, the system resets and jumps back to the first function trying to reinitialize all from the start.

Can anyone let me what could be the issue?

Thank you.

Best Richard

Parents
  • What interrupt priority is your timer running at? If you call softdevice methods from the higher of the allowable user priorities (ie 1) then you will hardfault and that usually ends up in a reset which means you start over.

  • ok - next step is to put a breakpoint in the app_error_handler() and see if you're ending up in there, which would cause a reset.

Reply
  • ok - next step is to put a breakpoint in the app_error_handler() and see if you're ending up in there, which would cause a reset.

Children
No Data