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

OTA DFU s110 to s130 with UICR.CLENR0 set

Hi,

Please help, I've been struggling with this problem for a week and I want to get to the bottom of it.

I have production devices in the field based on s110 v7.1.0. The newer firmware uses s130 2.0 and both work independently on the same hardware. I want to use the OTA DFU on the s110 version devices to upgrade then to use the current newer firmware using s130. My approach was to update the DFU and SD in one go using a combined package.

In my experiments, it seems that this is not possible, possibly because the devices have UICR.CLENR0 set to 0x16000 i.e. the default setting from older s110 projects.... I guess it should be 0xFFFFFFFF or 0x1B0000 for s130.

It states the following here: developer.nordicsemi.com/.../a00064.html

"If the register UICR.CLENR0 has a size value, e.g. 0x00016000 then it will not be possible to update to a SoftDevice of larger size."

So is this the reason I can't get the device to work? After updating the debugging hardware I can see the DFU and SD firmware images transferred ok, but the s130 DFU will not start.

The differences between the firmware images was checked for the OTA DFU'ed debugging device and the programmed device; The UICR difference was noted along with a few other differences listed below:

The MBR's are not identical

The MBR changes slightly during the DFU process?!

The application region - obviously it later contained the update package

The unused regions in the DFU area (the new DFU was slightly smaller) ~0x3Exxx

The DFU settings page at 0x3fc00 - the DFU process never completes in the new DFU because it doesn't start

I uploaded just the s130 DFU to the debug device, checked it worked, then changed the UICR.CLENR0 to 0x16000 and tried again. Now it starts up but latches up at address 0x6d0 in the MBR shortly after execution i.e. a hard fault. After this check, I'm fairly sure I found the issue -> CLENR0 value is not compatible with new s130.

Before I waste time finding the exact source of the lockup and before I start trying to modify the SD and MBR to remove the checks on CLENR0, I want to check... Is it possible to make s130 work once the CLENR0 is written to 0x16000 (default for s110)?

I still have other tests to do i.e. testing the stock dev board, finding the exact call that causes the lockup etc...

Thanks

Kim

  • Hi Karim, 

    As it mentioned in the documentation, and discussed partly here, it's not possible to update to a softdevice bigger size than the size indicated by CLENR0. The reason is that the part of the softdevice the exceed the CLENR0 won't be able to access the memory located under CLENR0 address. It's the hardware protection (please refer to the spec) and you can't "hack" the MBR to avoid that. 

    The only workaround is to erase the chip and not write to CLENR0, but then it's not OTA DFU, unfortunately. 

Related