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

halt Flash write

Dear everyone:

Can you tell me Using built-in flash and use restrictions,

because it halt at ble_flash_page_write() function.

  • Hi,

    Writing to the flash will halt your MCU for a given period of time (depending on how much data you write). When it's finished, the flash is written, the MCU will return (just like a normal function call).

    Can you explain more about the issue you are seeing? Are you being disconnected?

    Best regards Håkon

  • Thank for your reply. The Flash Write problem , I have found that because the softdevice open . so , I want to ask for advice about :

    I have know when I inside softdevice ,it protection the H.W and Memory. so,my problem must disable softdevice call nrf_softdevice_disable().

    But ,I don't know when time can close the softdevice ? When Close the sotfdevice ,it Cause happen? restrict ? (BLE disconnect,i.e...)

  • Thank for your reply. The Flash Write problem , I have found that because the softdevice open . so , I want to ask for advice about :

    I have know when I inside softdevice ,it protection the H.W and Memory. so,my problem must disable softdevice call nrf_softdevice_disable().

    But ,I don't know when time can close the softdevice ? When Close the sotfdevice ,it Cause happen? restrict ? (BLE disconnect,i.e...)

  • If you are trying to write to an address which the softdevice uses, you will most likely end up in the hard-fault handler, as this is a restricted address area. If you write to the top of the flash, this should not be an issue. How much data are you writing to flash? Are you doing this while in a BLE connection?

    If you are depending on writing data to the flash while in a connection, you should enable radio notification which will give you a "safe" window of up to 5.5 ms for you to store into flash. Most examples use this to store bonding information (ex: ble_app_cscs, ble_app_gls etc)

  • My development environment is nRF6310,sotfdevice s110_nrf51822_5.2.0 I want to write a page data(1kB) to flash(at top of flash,FLASH_PAGE_FLUSATION (NRF_FICR->CODESIZE-1)

    call err_code=ble_flash_page_write(FLASH_PAGE_FLUSATION,data_array,0xFE); function to write data to flash. when master(dongle) un-connect to slave(device).

    When first time ,it can write to flash .but second time, it will block at address a special address(PC,0x2000000A~2000008)

    Could you give me a Direction for this question? and i have a status ,it can connect to slave but not feedback data(at urat sample project)

Related