Function nrf_softdevice_s113::sd_flash_page_erase
source · pub unsafe fn sd_flash_page_erase(page_number: u32) -> u32
Expand description
@brief Flash Erase page
Commands to erase a flash page If the SoftDevice is enabled: This call initiates the flash access command, and its completion will be communicated to the application with exactly one of the following events: - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started.
If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the erase has been completed
@note - This call takes control over the radio and the CPU during flash erase and write to make sure that they will not interfere with the flash access. This means that all interrupts will be blocked for a predictable time (depending on the NVMC specification in the device’s Product Specification and the command parameters). - This call will make the SoftDevice trigger a hardfault when the page is erased, if it is protected.
@param[in] page_number Page number of the page to erase
@retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page. @retval ::NRF_ERROR_BUSY The previous command has not yet completed. @retval ::NRF_ERROR_FORBIDDEN Tried to erase a page outside the application flash area. @retval ::NRF_SUCCESS The command was accepted.