MPSL ASSERT: 105, 75 when initiating 802.15.4 repeatedly, tips for using 802.15.4 in timeslots?

Hello Devzone,

  1. I am trying to run timeslotted 802.15.4 alongside BLE using NCS. I have started from this example, replacing the propiertary RF calls with calls to 802.15.4 and manages to set up timeslots in between the BLE connection events. From within the timeslots, is it safe to call nrf_802154_ functions, or do I have to use the RADIO HAL for this? Is the proper way of having 802.15.4 communication to use nrf_802154_init() at the start of the timeslot, transfer data and then call nrf_802154_deinit() when the TIMER0 triggers, right before the timeslot ends?

  2. If I call nrf_802154_init() and nrf_802154_deinit() after each other repeatedly, it throws an MPSL assert on the n:th init() after a fixed number of cycles. Why is that, and is there something I can do to prevent it? This occurs even if I create an empty project without BLE or timeslotting mechanism. It also always asserts after the same number of cycles for the same configuration, but varying through configs.
    This is the error output from the empty project, calling nrf_802154_init() and nrf_802154_deinit() repeatedly:

    00> *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    00> 
    00> Initing
    00> Deiniting
    00> Initing
    00> Deiniting
    00> Initing
    00> Deiniting
    00> Initing
    00> Deiniting
    00> Initing
    00> E: MPSL ASSERT: 105, 75
    00> E: r0/a1:  0x00000003  r1/a2:  0x20003eb0  r2/a3:  0x20003eb0
    00> E: r3/a4:  0x00000001 r12/ip:  0x00000000 r14*** Booting Zephyr OS build v2.6.0-rc1-ncs1

    This is my main for reproducing this issue:
    #include <zephyr.h>
    #include <device.h>
    #include <sys/printk.h>
    #include <sys/byteorder.h>
    
    void main(void)
    {
    	int blink_status = 0;
    	int err;
    	printk("\n");
    
    	while (1) {
    		++blink_status;
    		k_sleep(K_MSEC(500));
    
    		if (blink_status % 2){
    			printk("Initing\n");
    			nrf_802154_init();
    		}
    		else{
    			printk("Deiniting\n");
    			nrf_802154_deinit();
    		}
    	}
    }

    If I call it from the timeslots, it asserts already on the 3rd init, with this error code:

    00> timeslot_start(len_us: 25000)
    00> 802.15.4 Initing
    00>  802.15.4 deiniting
    00> 802.15.4 Initing
    00>  802.15.4 deiniting
    00> 802.15.4 Initing
    00> E: MPSL ASSERT: 105, 75
    00> E: r0/a1:  0x00000003  r1/a2:  0x20010b50  r2/a3:  0x00000001
    00> E: r3/a4:  0x20010bc5 r12/ip:  0x00000000 r14/lr:  0x00027217
    00> E:  xpsr:  0x61000000
    00> E: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    00> E: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    00> E: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    00> E: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    00> E: fpscr:  0x0003aefd
    00> E: Faulting instruction address (r15/pc): 0x00027222
    00> E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    00> E: Current thread: 0x200020b8 (timeslot_thread)
    00> E: Halting system

     (Using timeslots, I also does some more stuff in the init such as setting addresses and channel)

Hope someone can help me with this!
I use NCS 1.6.1 and the nRF52840DK.

Parents Reply
  • Related to that, if I do a dummy timeslot program, requesting one timeslot and sending one 802.15.4 frame form it, the callbacks does not seem to be executed until after the timeslot ends.

    Here's a screenshot of two runs where I send a frame in the beginning of my timeslot. The source code are identical except for the timeslot length that is doubled in the second image:



    Is this behaviour expected? How can I have a transmission using 802.15.4 inside my timeslot if the callbacks aren't executed until it ends?

Children
No Data
Related