UART+BLE-based DFU in a single bootlader

Hello,

We have a nRF52840 on our board, whose fw we would like to be able to update through both BLE and UART (the MCU is connected to a ST32 MCU via UART) using a bootloader, possibly with minimal changes wrt the examples included in the SDK Slight smile

Up to now only the BLE secure bootloader version has been used and it works well. I took a look at the UART secure version, which doesn't seem to require the softdevice (while the BLE bootloader requires the s140 SD), and the two projects seem to differ only by the sdk_config.h file, the main being the same.

I have a few, probably naive questions (I have only a few days' experience on the Nordic ecosystem):

1) In order to have a BLE+UART bootloader, would it be enough to merge the sdk_config.h content of the two projects?

2) Since the BLE bootloader uses SD s140 and the UART one does not, would the BLE+UART bootloader be ok with just the s140, or does the s140 need (somehow) additional modifications as well?

3) As far as I understand from the Nordic documentation (please correct me if I am wrong) the serial DFU is performed using the SLIP protocol. IS it already implemented somewhere inside the bl firmware, so that one just has to send data from the host MCU according to the SLIP protocol, or should the user implement the protocol also on the Nordic side? 

Thanks!

Regards,

Stefano

Parents
  • Hi Stefano

    Which version of the SDK are you on?

    1) No, it is not quite this simple unfortunately. 

    2) There is no problem using the UART transport layer for DFU with the S140 present, so no change is needed to the SoftDevice. 

    3) The SLIP protocol is used for packetization of the UART data, yes. This is handled already on the Nordic side and doesn't have to be added. 

    Back to 1), it is possible to initialize the bootloader with multiple different transport layers enabled, allowing you to start an update over different transports. 

    A colleague of mine tried this with USB and BLE apparently, but not with UART and BLE. I will see if I can provide some code based on the work he did, and get back to you. 

    Best regards
    Torbjørn

Reply
  • Hi Stefano

    Which version of the SDK are you on?

    1) No, it is not quite this simple unfortunately. 

    2) There is no problem using the UART transport layer for DFU with the S140 present, so no change is needed to the SoftDevice. 

    3) The SLIP protocol is used for packetization of the UART data, yes. This is handled already on the Nordic side and doesn't have to be added. 

    Back to 1), it is possible to initialize the bootloader with multiple different transport layers enabled, allowing you to start an update over different transports. 

    A colleague of mine tried this with USB and BLE apparently, but not with UART and BLE. I will see if I can provide some code based on the work he did, and get back to you. 

    Best regards
    Torbjørn

Children
Related