This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

HardFault on sd_softdevice_disable

Hi, I want to disable the softdevice (S110) in order to use the "flash_page_erase" and "flash_word_write" functions. But, when the sd_softdevice_disable() is called I get HardFault. How can I disable the softDevice to get an access to the flash?

Eli

Parents
  • I think you're a little confused, you do not need to disable the SoftDevice in order to write or erase flash.

    To write to flash without disabling the SoftDevice, use the function sd_flash_write found in nrf_soc.h. Make sure to read the documentation for sd_flash_write, it requires aligned addresses on both source and destination.

    To erase flash while the SoftDevice runs, use sd_flash_page_erase also found in nrf_soc.h.

    If you have a good reason to not use the SoftDevice, then read the NVMC chapter of the reference manual and see examples in the file nrf_nvmc.c bundled in the Source directory of the SDK.

    Good luck!

Reply
  • I think you're a little confused, you do not need to disable the SoftDevice in order to write or erase flash.

    To write to flash without disabling the SoftDevice, use the function sd_flash_write found in nrf_soc.h. Make sure to read the documentation for sd_flash_write, it requires aligned addresses on both source and destination.

    To erase flash while the SoftDevice runs, use sd_flash_page_erase also found in nrf_soc.h.

    If you have a good reason to not use the SoftDevice, then read the NVMC chapter of the reference manual and see examples in the file nrf_nvmc.c bundled in the Source directory of the SDK.

    Good luck!

Children
No Data
Related