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

nRF_SoftReset issue query!!

Hello,

I am using nRF52832 EVM board with SDK 15.3.0 in SEGGER studio IDE, win 10.

When I am implementing sd_nvic_SystemReset(); in my code, that time i am not able to write data  in flash.

Before writing data device is getting reset. So data is not getting store in flash

Solution done by me:

1. I have tried with delay after writing data to flash, then reset the device, still facing same issue.

2. Another solution,I have created a timer of 5 sec and after writing data in flash Timer is getting started and after 5 sec device is getting reset. In this scenario it is working fine.

Any solution/ suggestion why it is behaving in this manner?

Regards,

Urvisha 

Parents
  • HI,

    Writing to flash is asynchronous.

    When using the SoftDevice API, you will get a SoC event from the SoftDevice when the flash operation is complete or has failed, i.e. NRF_EVT_FLASH_OPERATION_SUCCESS or NRF_EVT_FLASH_OPERATION_ERROR.

    When using SDK libraries, there are other events that signals that a flash operation has succeeded or failed, depending on the flash library used.

    In any case you should wait for the appropriate flash operation event before resetting the device.

    Regards,
    Terje

Reply
  • HI,

    Writing to flash is asynchronous.

    When using the SoftDevice API, you will get a SoC event from the SoftDevice when the flash operation is complete or has failed, i.e. NRF_EVT_FLASH_OPERATION_SUCCESS or NRF_EVT_FLASH_OPERATION_ERROR.

    When using SDK libraries, there are other events that signals that a flash operation has succeeded or failed, depending on the flash library used.

    In any case you should wait for the appropriate flash operation event before resetting the device.

    Regards,
    Terje

Children
No Data
Related