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

BLE with FREERTOS - nrf_drv_gpiote_out_set/clear triggers Assertion failed

Hi, 

We are working with integrating LoRa to our nRF52840 with BLE and FreeRTOS. To be sure that LoRa worked as expected, we configured and tested LoRa on nRF52840 dk and observed it was functioning. Now, when we are moving the LoRa code to BLE and FreeRTOS code on nRF52840 dk, we get assertion failed error on nrf_drv_gpiote_out_set and sometimes on clear. I'm wondering if its the softdevice for BLE that can effect the GPIO configuration? 

This is the error on terminal: 

 app: ASSERTION FAILED at /****/***/***SDK/external/freertos/portable/CMSIS/nrf52/port_cmsis.c:273


Would appreciate any guidelines on how to solve the problem! 

Best Regards,
Hamza

  • Hi, 

    So the problem is no longer related to the SPI but more related to Freertos and nrf application regarding handling callbacks on Lora Module. 

    See the following attachments; 

    So the highlighted is where the Mac function of LoRa is executed, which is a callback. The callback function is placed in the MacCtx structure MacPrimitives. This generates the following error..
    The highlighted is where the function is called and the error occurs.


    Similar error occurs when my Task is waiting on a semaphore. 

    Regards,
    Hamza

  • Hi

    Historically, a hardfault at 0x00000000 points to a NULL value being passed as a function pointer somewhere in your application, so I suggest trying to figure out if this is done somewhere in your application. You can also try adding DEBUG to your preprocessor definitions to see if you can get some more information that way.

    Best regards,

    Simon

Related