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

About MBR area of softdevice

Hi, I'm using s130 as softdevice for nrf51822. I program the softdevice with the official s130 hex file. According to the hex file, there is no data at address from 0x7c0 to 0x1000. This is the reserved area for MBR. So I don't want to touch this address area, and just program other area with data. But the chip is finally stuck at the address 0x596 if there is some old data left at the area from address 0x7c0 to 0x1000. If I erase this area or just set the area to 0. Then the chip works file.

So looks like we have to set the area from address 0x7c0 to 0x1000 to all 0x0 or 0xFF data, otherwise the softdevice can't work fine.

My confuse is why we have to clear this area? Looks like this is a useless area, and should not effect anything. If we have to clear this area, then does it mean we should add this information to hex file of s130?

Parents
  • Hi,

    This area should not be touched.

    Could you provide more detailed info on what operation you're performing?

    Cheers Håkon

  • Well I don't know this for a fact, but what I "assumed" is going on is the MBR is using some of that space for NV storage. Nordic claims that the MBR will make sure a boot loader or soft device is completely copied over. For it to do that, the MBR is going to need to save some information in case the device loses power during the operation. My guess is the last 1K of memory at 0xc00 to 0xFFF is probably used for this purpose. My guess is when you issue the MBR command to copy the soft device, the MBR probably erases that 1K of memory, and then writes some information regarding the copy it is about to do. Then it copies the memory. If there is garbage in that section then when the MBR boots up it probably thinks it needs to copy the soft device and since it is garbage it hangs somewhere.

Reply
  • Well I don't know this for a fact, but what I "assumed" is going on is the MBR is using some of that space for NV storage. Nordic claims that the MBR will make sure a boot loader or soft device is completely copied over. For it to do that, the MBR is going to need to save some information in case the device loses power during the operation. My guess is the last 1K of memory at 0xc00 to 0xFFF is probably used for this purpose. My guess is when you issue the MBR command to copy the soft device, the MBR probably erases that 1K of memory, and then writes some information regarding the copy it is about to do. Then it copies the memory. If there is garbage in that section then when the MBR boots up it probably thinks it needs to copy the soft device and since it is garbage it hangs somewhere.

Children
No Data
Related