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

Reset safety of sd_mbr_command(SD_MBR_COMMAND_INIT_SD)?

I don't have a particular issue right now, just a concern that I have because my device needs to be bulletproof when it comes to reset behavior.

When sd_mbr_command(SD_MBR_COMMAND_INIT_SD) is called, what happens in terms of memory operations? Because the function's effects persist through a reset, it must be writing to flash, and if it's doing that, wouldn't it have to erase a page in order for any data to be re-written? If a crucial page of memory is erased when a device loses power, that can brick a device, and I don't see anything in the documentation that explicitly states that this won't happen.

The bootloader seems to need SD_MBR_COMMAND_INIT_SD to jump to the app, but the MBR documentation only says that COPY_BL and VECTOR_TABLE_BASE_SET need a dedicated BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS page, so I don't allocate one (yet).

Parents Reply Children
No Data
Related