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
  • Yes, I am ending up app_error_handler(). I am still able to reach the root of the problem as I have enabled the ble stack and have a system reset due to assert_nrf_callback(). If I do not plugin the functionality of communication over UART in my timer handler rountine then I have no issue and the skeleton code just runs as desired. I'm unable to debug the UART communication as step over after the breakpoint, I end up in assert_nrf_callback(). As I mentioned earlier, the UART communication works completely fine my main() before initializing the ble stack

Reply
  • Yes, I am ending up app_error_handler(). I am still able to reach the root of the problem as I have enabled the ble stack and have a system reset due to assert_nrf_callback(). If I do not plugin the functionality of communication over UART in my timer handler rountine then I have no issue and the skeleton code just runs as desired. I'm unable to debug the UART communication as step over after the breakpoint, I end up in assert_nrf_callback(). As I mentioned earlier, the UART communication works completely fine my main() before initializing the ble stack

Children
No Data
Related