Functions | |
ret_code_t | nrf_bootloader_flash_protect (uint32_t address, uint32_t size) |
Function for using hardware to protect flash from writing and reading. More... | |
void | nrf_bootloader_app_start (void) |
Function for starting another application (and aborting the current one). More... | |
void nrf_bootloader_app_start | ( | void | ) |
Function for starting another application (and aborting the current one).
This function uses the provided address to swap the stack pointer and then load the address of the reset handler to be executed. It checks the current system mode (thread/handler). If in thread mode, it resets into the other application. If in handler mode, isr_abort is executed to ensure that handler mode is left correctly. It then jumps into the reset handler of the other application.
ret_code_t nrf_bootloader_flash_protect | ( | uint32_t | address, |
uint32_t | size | ||
) |
Function for using hardware to protect flash from writing and reading.
This function applies write/erase protection to a specific area, using the BPROT or ACL peripheral, depending on which is available.
[in] | address | The start address of the area to protect. Must be a flash page boundary. |
[in] | size | The size of the area to protect, in bytes. Must be a multiple of flash page size. |
NRF_SUCCESS | Flash protection applied successfully. |
NRF_ERROR_NO_MEM | No more ACL instances to use for flash protection. |
NRF_ERROR_INVALID_PARAM | Address was out of range or size was not a multiple of flash page size. |