cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 boot

bestyeng
Associate II

Hi, I have a STM32G474 connected to a Quectel LTE module via a uart4 and a GPIO pin.
Under normal conditions is it possible for the CPU to boot from flash and when the quectel changes the level of the gpio pin of the STm32, the CPU jump to boot from uart4 to update the firmware?
Is this the best solution, using a GPIO pin?

Many Thanks.

1 REPLY 1
KnarfB
Principal III

You can configure a GPIO pin as EXTI interrupt and, from the interrupt handler, jump to a boot loader. You could jump to the built-in system memory boot loader, but that one supports only other uarts, not uart4, see STM32 microcontroller system memory boot mode - Application note. Or, write your own, maybe starting with STMicroelectronics/stm32-mw-openbl: Provides the Open Bootloader library, part of the STM32Cube MCU Component "middleware", for all STM32xx series.

Care must be taken for edge cases, like the GPIO level during power-on sequence. Or, when the firmware is buggy and the EXTI interrupt no longer handled.

hth

KnarfB