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

Why MBR is erased when I erase or write the SorfDevice with 1kB at address 0x3000?

HI, All.

I have some troubles: Why MBR is erased when I erase or write the SorfDevice with 1kB at address 0x3000? My SorfDevice version is 7.1.0.

Thanks all.

Update: Attach my snapshot:

Befor erase the 12th page: image description

Erasing the 12th page: image description

After erase the 12th page: image description

Read and save as hex file: image description

Parents
  • I use the tool "nrfjprog.exe" to erase 12th page(start at 0x3000),and I use the MBR API :

    static uint32_t dfu_copy_sd( uint32_t * src, uint32_t * dst, uint32_t len)

    {

    sd_mbr_command_t sd_mbr_cmd;
    
    sd_mbr_cmd.command            = SD_MBR_COMMAND_COPY_SD;
    sd_mbr_cmd.params.copy_sd.src = src;
    sd_mbr_cmd.params.copy_sd.dst = dst;
    sd_mbr_cmd.params.copy_sd.len = len / sizeof(uint32_t);
    
    return sd_mbr_command(&sd_mbr_cmd);
    

    }

    to write 1kB data into 12th page(start at 0x3000), all this two ways the MBR is erased,why?

Reply
  • I use the tool "nrfjprog.exe" to erase 12th page(start at 0x3000),and I use the MBR API :

    static uint32_t dfu_copy_sd( uint32_t * src, uint32_t * dst, uint32_t len)

    {

    sd_mbr_command_t sd_mbr_cmd;
    
    sd_mbr_cmd.command            = SD_MBR_COMMAND_COPY_SD;
    sd_mbr_cmd.params.copy_sd.src = src;
    sd_mbr_cmd.params.copy_sd.dst = dst;
    sd_mbr_cmd.params.copy_sd.len = len / sizeof(uint32_t);
    
    return sd_mbr_command(&sd_mbr_cmd);
    

    }

    to write 1kB data into 12th page(start at 0x3000), all this two ways the MBR is erased,why?

Children
No Data
Related