This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF52840 / NRF52832 DFU Bootloader for multiple transport layers.

Hi There, 

I am currently using a custom bootloader for my devices which was started from the secure bootloader example given in the SDK, I am using  BLE as the transport layer, I was wondering if you guys have any examples that merge more than one transport layer in the bootloader, for instance BLE and USB for the NRF52840, or SPI and BLE for the NRF52832 in this case I am using a FTDI chip USB to SPI IC. 

Any guidance or recommendations on this topic would be much appreciated.

Thanks, 

Regards 

  • Hi,

    The nRF5 SDK supports multiple transports, but it is not demonstrated by any example. In practice, you need to add all files, includes and sdk_config.h configurations from both example projects (say BLE and USB). I suggest you start of with the BLE example and add the other transport into that, as the BLE example bootloader allready depends on the SoftDevice etc. You also need to reduce the bootloader start address and increase the size, to accommodate the larger bootloader. 

    Note that you need to do very little code changes, as the transports are automatically registered build time (using section variables). So as long as both transports are included in the build, both will be used.

    You should also handle this issue, which could cause problems when using multiple transports.

    Einar

  • Hi Einar, 

    Thank you for your quick response this clears up my main questions. On a another note the second case I mentioned above for the nrf52832 using a FTDI-IC for USB-SPI translation, would it be possible to implement a bootloader that uses SPI and BLE ? I see in the SDK that there are some UART examples but nothing for SPI. 

    Thanks, 

    Regards 

  • Hi,

    We do not provide a SPI transport for the bootloader. However, the design is quite clean, and the transport is separated from the rest of the bootloader (you can allready mix and match of the available transports). So you can add your own SPI transport. It probably makes most sense to duplicate the existing serial (USB&UART) transport files (components\libraries\bootloader\serial_dfu) and modify them to add SPI. This has been done by some customers before, for instance in this thread.

Related