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

ASSERTION FAILED at ral_fsm.c:318 - Can not even find this file

As the title descripes i get an error with a file name in it but i can not locate this file.

I am working with the 802.15.4 wireless uart example on a nRF52840 DK. I only get this error if i start inserting breakpoints, i can debug some lines and than suddenly this error.

The Call Stack looks like this:

app_error_fault_handler()
assert_nrf_callback()
RADIO_IRQHandler()

Maybe someone can help with this error. Are there more example or even a template for 802.15.4 or is this the only project i can build on?

Thank you soo much!

Parents
  • Hi,

    The SDK provides the 802.15.4 driver as a pre-compiled library which is why you can't see the source code when debugging. The source code is however available on GitHub if you are interested (link). 

    I assume the problem is that you get an assert in the driver because you are single stepping through the code. Only the CPU becomes halted when you hit a breakpoint; timers will keep running so the driver may detect that radio protocol timing requirements were not met as soon as you resume execution.  A workaround for this limitation is to use Monitor mode debugging (link).

  • The example i am using is not including the app config and so the app_timer_pause(); is not defined.

    Do i need to include the app timer? Do i need to stop and start another timer on entree/exit?

  • Normally you will not have to debug the radio drivers. It may be best to use the pre-compiled libraries which are tested for the particular SDK release they have been distributed with.

    It's not required to include _pause/_start even if you use the app_timer. We have another blog post on monitor mode debugging that you may find helpful as well (think the last 3 paragraphs are most relevant): https://devzone.nordicsemi.com/b/blog/posts/monitor-mode-debugging-with-j-link-and-gdbeclipse 

  • Thanks for the link, it llok really helpful if someone is using Eclipse and GDB, but i can not transfer all off the given information to the SES which i am using. All examples are provided with a working project for SES and your engineers recommended using the SES. Is the a similar guide for the SES?

    My intention is not to debug the radio driver. But something is causing assertation faults and i need to get rid of those(weather i am causing those are something else).

    I am running some non hardware related code on the APPLICATION TASK and i am getting assertations in sys_queue.c:152 and ral_fsm.c:318. I can not find those on the github repository you linked in the first  replay.

  • rico said:
    Thanks for the link, it llok really helpful if someone is using Eclipse and GDB, but i can not transfer all off the given information to the SES which i am using. All examples are provided with a working project for SES and your engineers recommended using the SES. Is the a similar guide for the SES?

    Sorry, I should have been more clear. you should ignore the Eclipse/GDB specific info at the beginning of the tutorial. So what I'm suggesting is that you read the blog post I linked to initially plus the last 3 paragraphs in the Eclipse/GDB tutorial because it gives some tips on how to select the interrupt priority. There's also the official documentation from Segger (link).

    rico said:
    My intention is not to debug the radio driver. But something is causing assertation faults and i need to get rid of those(weather i am causing those are something else).

     Do you get the assert even if you don't do single-step debugging? 

    rico said:
    I am running some non hardware related code on the APPLICATION TASK and i am getting assertations in sys_queue.c:152 and ral_fsm.c:318. I can not find those on the github repository you linked in the first  replay.

     And sorry about this. I was under the impression that we had the complete stack in the openthread repo, but it's just the driver (also hosted here). We do not provide source code for ral_fsm.

  •  Do you get the assert even if you don't do single-step debugging? 

    I have tried debugging the wireless_uart example. It is running fine without single stepping.

    Sorry, I should have been more clear. you should ignore the Eclipse/GDB specific info at the beginning of the tutorial. So what I'm suggesting is that you read the blog post I linked to initially plus the last 3 paragraphs in the Eclipse/GDB tutorial because it gives some tips on how to select the interrupt priority. There's also the official documentation from Segger (link).

    As simple as it sounds, it is not working. Maybe you can try yourself with the example provided in the SDK. I am trying to debug the beginning of the "a_radio_tx_start" function in the fsm. This is called from the user task and should be as far as i understand debuggable.

  • Hi,

    I added MMD support to wireless_uart->raw->first in SDK 15.3.0, see attached. However, I wasn't able to replicate the assert by single stepping through the code without MMD enabled. Can you try with the same configuration on your side? 

    wireless_uart.zip

Reply Children
Related