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

When I get the SD Assertion at address 0x12D7E (SD132 V3.0.0)

Hi,

can you please tell me in what cases I get this assertion?

SOFTDEVICE: ASSERTION FAILED, PCxxx: 0x12D7E

It seems to happen when a connection is active, timeslot is active and trying to erase or write to flash.

Regards

Martijn

  • Hi Martijn, 

    Could you let me know how did you do the flash operation when in timeslot ? 
    As far as I know, you still need to call the softdevice's flash API instead of accessing NVMC directly. 

    The assert location you provided  pointing to an assert that the RADIO is not ready when needed. I suspect that the flash operation took long time and affecting the radio disabling when the softdevice taking over. 

  • Hi Hung Bui,

    Yes that's what I'm doing. The sd_flash_page_erase() is used to erase the flashpage.

    Is it the responsibility of the SoftDevice to have the RADIO ready when needed even though the application has requested to erase a flash page (via the softdevices's flash API)? Or should the application not start an erase when the end of the timeslot is nearer than the worst case erase time?

  • Hi Martijn, 


    From my understanding, if you call sd_flash_page_erase() the action will only be queued and won't be executed until the timeslot is finished. 
    Could you please verify if you don't call sd_flash_page_erase() inside the timeslot you don't see the assert anymore ? 

    I checked with the developer and it seems that you may need to handle flash operation manually (use NRF_NVMC directly, and make sure it inside a safe margin timing so that the timeslot won't expire before the function finishes). 

    If you can provide a minimal example that reproduce the issue so that we can test and verify here it would be great.

  • Hi Hung Bui,

    I will try to capture the scenario with some real time logging. Without knowing the exact order of events it will be difficult to come to a conclusion.I will also see what I can do with repect to some example code.

    One more question in the meantime though:

    Does the need to do flash actions directly (NRF_NVMC) mean that a sd_flash_page_erase() call during a timeslot does not always return BUSY until the timeslot has ended?

  • Hi Martijn, 
    It will not return NRF_ERROR_BUSY because it will only return that error code if the previous flash command has not yet completed. 

    What it does is to schedule the operation right behind the timeslot. So if you request a timeslot and you keep extending it to stay in the timeslot, if you call a sd_flash_* command the timeslot will not be extended and it will end.

    Depends on the priority you are requesting for your timeslot, the flash operation can be executed right away after the timeslot ends if you request timeslot at normal level, or it can be preempted for a few times before it get high priority if you request the timeslot with high level. 

    But anyway it should work and shouldn't throw any error. So if you can give an example code that reproduce the issue it would be great. 

Related