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

The program terminates at NRF_BREAKPOINT_COND while using interrupts with timers

Hey,

I am using nRF52840-DK and SDK 15.2 and working on 802.15.4. The transmitter is sending beacons at an interval of 2sec. The receiver is scanning the network for beacons every 100ms. On not receiving a beacon it must sleep for some time, wake up again and then scan for beacons again. 

I have been able to implement scanning the network for 100ms, initializing a timer and sending the device to sleep mode for a specific amount of time. When the device has to wake up from sleep mode, I am generating an interrupt. However, the device is not able to enter the interrupt function and goes straight to NRF_BREAKPOINT_COND in debug mode.

On looking at the functions where the errors are once the program has reached NRF_BREAKPOINT_COND:

The command at line 0x00010313 of void assert_nrf_callback(short unsigned int line_num= 0x0003, const uint8_t* filename=0x00010313) is :

 

I can't understand what this means and how to solve it.

The timer initialising function is:

The interrupt function is:

The part of the function where I am calling the timer function and sending the device to sleep mode is:

After the interrupt has been serviced, the program execution should start from this function where it had been left. However, it is going to NRF_BREAKPOINT_COND.

How do I solve this error?

Parents Reply
  • I've changed the priority but it doesn't bring any change in behaviour.  

    I hope I'm changing it correctly.

    Edit: I was wondering if this link would be helpful. I tried to disable RADIO_IRQn interrupt while the timer function generated the Timer interrupt. In that case, the timer is working fine, the system is going into sleep mode, waking up from generating interrupt but then it enters the while(1) loop of sleep mode (after exiting from timer2init() ) and doesn't come out. 

    It gets stuck here:

    This wasn't happening before and the system could come out of the sleep mode automatically once the timer was over.

Children
Related