Re: Process HCI_UART BLE Connectivity updating FW in the field
If you don’t have a debug connection between the iMX and the nRF52832 then you need to use the UART to update the firmware. In order to achieve that you will need to use a bootloader to swap images between 2 banks, because without a debugger that is the usual approach.
MCUboot is an open source bootloader that allows you to perform firmware upgrade indirectly (i.e. the application that is running receives and stores an image in the second slot and then reboots so that MCUboot swaps it) or directly using a “recovery mode”: The chip running MCUboot boots into its recovery mode and then listens on the UART for commands which allow for a new image to be uploaded.
This is achieve through the BOOT_SERIAL option in MCUboot:
Unfortunately it is not very documented at this point, but the idea is that you boot the nRF52832 with a pin set to a value (high or low):
and that triggers serial recovery mode, where MCUboot waits for commands on the UART to upload a new image.
The tool that can be used to send that image is mcumgr, and the process is almost the same to using mcumgr with indirect firmware upgrade. To install mcumgr:
$ go get github.com/apache/mynewt-mcumgr-cli/mcumgr
And then you can create a serial connection profile with it and start uploading images.
From: Vieren Frank <F.Vieren@...>
Sent: 10 April 2019 09:26
To: devel@...; Cufi, Carles <Carles.Cufi@...>
Subject: Process HCI_UART BLE Connectivity updating FW in the field
Hi Carles, all,
What is the best way to do a firmware update in the field? What it is possible?
So far in the lab, I have a proto board with a nrf52832 chip onboard and also a JTAG connector. The JTAG connector of the proto board is connected to the DEBUG connector of nRF52 DK and is used for flashing the FW.
Of course this process is not applicable for field updates.
So far I found some documentation on how to proceed when wanting to do the upgrade FW process in the field.
Also I want to be sure all the pinning required is present not just for operating the nrf52 as BLE connectivity chip.
The idea is just to connect the nrf52832 with its UART pins to one of the main processor's (IMX6 UL-S) UARTs. And also to have the reset accessible.
I'm wondering is this sufficient, and not having to have other pins to be controllable for the upgrade process?
How does the mcuboot fits in this story?
Not full understand this statement in the topic that is embedded in this topic.
"No, it's the same UART, but you'll need to reboot into MCUboot's serial recovery mode, update the image and then reboot back into the new image."
Thanks in advance,