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

About the secure serial DFU for nRF52840 and nRF52832

Hi,

I'm using SDK13.0 with nRF52840. Now I'm doing the DFU by the UART through MCU. But we meet a big problem, MCU is hard to read the infomation in the .dat and .json file, so we want to just use the .bin file to do DFU.

I have seen the data on the UART interface as the attachment. It seems MCU must read the infomation in the .dat and .json file and then send to nRF52840, so that it could do DFU. What we want to do is not to do Transfer of an init packet, just do Initialization and the Transfer of a firmware image . As described link text

Could anyone tell me how to do for the bootloader project? Thanks.

PC.txt BLE.txt

  • Hi Alice,

    The MCU doesn't need to read the .json file. It just need to send the .dat (which is the binary of the init packet) and the .bin.

    If you don't plan to send init packet, you will not be able to check for image size, CRC and signature when you receiving the image.

    I would suggest you to try sending init packet, instead of modifying the bootloader to skip it.

    If you want a very simple bootloader, you can go back to SDK v6.x where we don't require init packet, and the bootloader was pretty simpler.

  • But the SDK v6.x couldn't work with nRF52840. We would put the zip file on the "Cloud" then send the file to WIFI module through WIFI, the WIFI module would do DFU via UART interface.We have many other MCU use the same protocol to update fireware. They wouldn't have the init packet, so how to let the WIFI module know the packet is the init packet? Thanks.

  • You would need to modify the bootloader in SDK v6.x to meet your need. I think it shouldn't be too difficult just some change in the flash size and softdevice API.

    Do you have full control over the WIFI module, is there any MCU on it ? If there is, you should be able to program the chip to send init packet first and then send firmware image .

  • No, the WIFI module just work as a reply to send data to cloud and couldn't be proramed.

    Could you tell me more about how to modify the bootloader in SDK v6.x? Thanks.

  • If there isn't any MCU on the Wifi module, how would you plan to interface the bootloader with the Wifi module ? At the beginning you mentioned "I'm doing the DFU by the UART through MCU", where does the MCU sit in your set up ?

    There are several steps you need to do with the bootloader, first step would be to make it work with the new Softdevice, after that you need to adapt the flash size to match with nRF52840. There are some difference in the SDK library as well. It's not a quick task but would require some work here. My comment above on "just some change in the flash size and softdevice API" was not really correct. Sorry about that. My idea here is to follow what we do in SDK v6 and make your own bootloader. Because the bootloader in that SDK was much more simpler.

    With further consideration, I think it's easier just to make the MCU to send the init packet and use the stock SDK v13+ bootloader.

Related