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

Is there a checksum embedded in the S110?

Hello everyone,

I haven't read anything in the official documentation about it, but I was wondering if the S110 has an embedded checksum that I can use to verify its integrity at runtime.

I already do something similar for my application and it would be useful to extend the concept to the SoftDevice as well.

Thanks!

  • Well, for updating the bootloader and softdevice, we still need to use the bootloader setting page to store to flash the state of the DFU process because we do a reset when updating bootloader. So I'm not really sure you can get rid of the bootloader setting page.

  • I do the reset, but pass a flag via GPREG. I store the state for the swap in uninitialized SRAM (so it doesn't get cleared by my start code) and protect it with a CRC. Before doing the swap it checks the embedded CRCs.

    The only side effect is my current implementation of the swap can't survive a power failure during a swap like it is claimed the nordic dfu code can. I suspect that claim is dubious at best. My bootloader won't let you do an upgrade if the battery isn't >50% and there is no power switch or way to reset the device. I don't have the flash to do dual banks, but I did consider implementing a non-softdevice pre-bootloader that could pull a clean image off the external SPI flash, but decided it wasn't worth the complexity.

  • Actually, our bootloader does survive if there is a power failure when doing swap.

    The state is stored on flash and is only marked as finished when the swap completed successfully with a CRC check. We also have a single bank OTA example, not an official one but you can have a look here.

    I think we should stop the discussion on Moloch's thread here :) If you have further question or want to discuss more on the bootloader solution, I would suggest you to creat a new thread.

Related