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

Parents
  • Thank you for explaining. Can you upload a snippet of code showing me how you are initializing SPI communication, and how the task you're using to control the SPI process is set up? Also, what pins are you using for communication with the LoRa transceiver?

    Best regards,

    Simon

  • Hey Simon, 

    I managed to solve the issue as it was more related to freertos. Now I have another issue that only occurs when I switch from bare metal to Freertos based on the same example. It's difficult to describe the error but It triggers when I try to execute a callback function on LoRaMac functions. I get the following error: 

    The processor has made an unaligned memory access.

    I am developing the software upon the same example I stated before. 

    Regards,
    Hamza

  • Hamza_HK said:
    It triggers when I try to execute a callback function on LoRaMac functions.

     This occurs in the nRF application, correct? Is it when trying to communicate with the LoRa module over SPI you see this error? Are you able to upload a debug log so we can get a better picture of the entirety of this application maybe?

    Best regards,

    Simon

  • 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

Reply
  • 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

Children
No Data
Related