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

Can we do FOTA to other microcontroller which is connected with nRF51822?

I want to do firmware update over the air in a STM32F4xx microcontroller which is connected with nRF51822 chip via UART (TX, RX, CTS, DTR) and BOOT pins. ST microcontroller has a bootloader which can flash the firmware via UART peripheral when BOOT pin is low.

Please help me with this. Thanks in advance !

Parents Reply Children
  • Thanks for quick response. I don't have any sample example code to do that. So can you please recommend any example code from which I can learn and implement my application?

  • You can pick and mix from the examples. There's plenty of them which use the UART for sending debugging messages etc, so you can pull some of the code from there for your send, the UART driver is fairly simple, just stuff data at it and it sends it out. For getting the image over the air, the BLE UART code would be a good starting point, or start with the BLE DFU code which is similar, that has some structure to the whole thing, and just change it to collect the image in memory and send it out instead of performing a DFU on the nordic.

    Your only problem may be having enough space for the image you want to send to the STM, you may have to send it out as it comes in, or bring it in a few chunks at a time and write it out.

  • Hello RK, I have done both examples independently sending and receiving messages over UART and FOTA for Nordic itself and both examples and it worked properly. But now when DFU is starting from bootloader and at which place I should add UART service, that thing I am not able to figure out. So my main question is, can you tell me where those data packets are coming in bootloader s110 example code?

  • dfu_transport_ble.c seems to contain most of the BLE DFU code.

Related