I'm working on a wearable device equipped with a EFR32MG12 and I'm using OTA DFU to upgrade the firmware. The board
is powered on by the means of a pushbutton and the firmware drives a GPIO output to hold on the power, so the circuit
remains working after the releasing of the pushbutton. Once done that, there is nothing exciting to see, except for two
leds that turn on.
So, to upgrade the application, I first generate the application.gbl then I load it into my smartphone and start the OTA
thru Blue Gecko app.
The upgrade terminates successfully ONLY IF I KEEP THE PUSHBUTTON PRESSED until the end of transfer. Otherwise
the chip resets - I see two leds turning off after starting OTA - so the power hold GPIO pin is cleared too and the
circuit shuts off.
To call the appLoader, I currently use the following code:
/* Check if need to boot to OTA DFU mode */
/* Enter to OTA DFU mode */
that is the suggested way to start the appLoader, but to avoid such reset I need an alternative.
How could make my application jump in a polite way directly into appLoader code without performing a reset?
ps. i'm using gecko sdk suite 2.5
You could drive that GPIO on the bootloader and add a capacitor to keep the level high between the reset (where the GPIO gets tristated) and the bootloader kicking in. The Apploader doesn't touch the GPIOs so you will system will remain powered.
at last, I'm back again on this project - i had to manage many more urgent issues first... - so, i added the capacitor between
the power-hold gpio and ground, a 4,7uF probably a smaller one would be enough but now I want to test if in general the trick works.
I have no a clear idea of what happens when gecko_cmd_system_reset(2) is called - I mean, I don't know what function or handler in the bootloader will be executed afterwards. Do you know where in the bootloader I should drive that GPIO?