This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SOFTDEVICE: ASSERTION FAILED PC=0x00017826

Hi,i'm using NRF52840 as BLE central to develop our products,the enviroment is:

SDK:16.0

SD:s140_nrf52_7.0.1

also using the third party RTOS:RT-Thread

what causes this softdevice assertion fail?

Parents
  • Hi 

    I will check with the stack team what this particular assert could be caused by. 

    In the mean time, can you give me a bit more information about the problem:

    1) Does it happen consistently, or only on rare occasions?

    2) Does it happen when you do something in particular in the application, such as establish a BLE connection, send some data, or similar?

    Also, you mention that you use an RTOS. The SoftDevice requires exclusive access to interrupt priorities 0, 1, 4 and 5, and if any other parts of the system use these interrupt priorities then the SoftDevice could crash. 

    Can you confirm whether or not you have any other interrupts enabled using these priorities? 
    When using an RTOS it is quite common for the RTOS to use one of the highest priority interrupts to handle its scheduling. 

    Best regards
    Torbjørn

  • Thank you for your reply.

    1.It happen on rare occasions.

    2.It happened by accident,sometimes when scanning, sometimes when receiving and transmitting data.sometimes it takes us hours to appear again.

    3.I checked all the interrupts in use:

    IRQ                                         priority

    -----------------------------------------------

    SysTick_IRQn                           7

    POWER_CLOCK_IRQn           4

    RADIO_IRQn                            0

    UARTE0_UART0_IRQn            6

    GPIOTE_IRQn                          6

    SAADC_IRQn                           6

    TIMER0_IRQn                          0

    RTC0_IRQn                              0

    SWI2_EGU2_IRQn                   6

    SWI5_EGU5_IRQn                   4

    MWU_IRQn                              1

    I2S_IRQn                                  5

    UARTE1_IRQn                         6

    The RTOS use SysTick_IRQn for scheduling.

    4.I'm not using timeslot API.

    5.Using fstorage API to read/write bonded peer address.

    6.Only disable global interrupt when scheduling by RTOS kernel.

  • Hi 

    Dantes.gan said:
    6.Only disable global interrupt when scheduling by RTOS kernel.

    Most likely this is the issue. The SoftDevice is not designed to allow you to disable or delay its interrupts. 

    The SoftDevice comes with its own functions for disabling all non-SoftDevice interrupts which you should use instead, called sd_nvic_critical_region_enter() and sd_nvic_critical_region_exit().

    Could you try to use these functions instead in your RTOS kernel?

    Best regards
    Torbjørn  

Reply Children
Related