cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing firmware using System Bootloader and STM32CubeProgrammer on Nucleo-G491RE

newbie_stm32
Associate III

Hi, I am working on making firmware write work using System Bootloader and USART1 interface on NUCLEO-G491RE. I have a code snippet taken from the internet which jumps to the System Bootloader section of the code once the User Button is pressed. I have interfaced a USB to UART converter at PA9, PA10, and GND as suggested in the AN2606.

void BootloaderInit() {
	void (*SysMemBootJump)(void);
 
	volatile uint32_t addr = 0x1FFF0000;
	HAL_RCC_DeInit();
 
	SysTick->CTRL = 0;
	SysTick->LOAD = 0;
	SysTick->VAL = 0;
 
	__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();
	__disable_irq();
	SysMemBootJump = (void (*)(void)) (*((uint32_t*) (addr + 4)));
	__set_MSP(*(uint32_t*) addr);
	SysMemBootJump();
}

But once the User Button is pressed and tried to connect to the UART interface using STM32CubeProgrammer it shows


_legacyfs_online_stmicro_images_0693W00000bimIOQAY.pngWhy is the firmware upgrade not working?

23 REPLIES 23
MM..1
Chief II

First check hw mode


_legacyfs_online_stmicro_images_0693W00000bimigQAA.pngafter this work try jump into.

Kamil Duljas
Senior III

Have you valid settings of UART connection? 9600 baudrate and parity even? Power from UART also connected?

Dudo

Hi, @mm..1​ I have already followed this and changed them using STM32CubeProgrammer using the ST-LINK option. I have opted for the first option on Pattern 15.

Please find those here, correct me if I have missed something.


_legacyfs_online_stmicro_images_0693W00000biq88QAA.png

Hi, @kamil Duljas​ I have ensured the proper connection and those are as follows

USB to UART ----> NUCLUEO-G491RE

--------------------------------------------------------

TX -----> PA10 (CN10 pin 33)

RX -----> PA9 (CN10 pin 21)

5V -----> E5V (CN7 pin 6) with JP5 jumper position set to E5V

GND -----> GND (CN7 pin 22)

Please find this


_legacyfs_online_stmicro_images_0693W00000biqCUQAY.png

How does your usb<->uart look like? It works with 5V or 3.3V? MY UART have jumper 3,3<->5V.

When I used STM32CubeProgrammer and UART I choosed 3.3V.

Dudo
newbie_stm32
Associate III

Hi, @Kamil Duljas​ same here. It comes with a jumper to choose between 3.3V and 5V. I have connected it to 3.3V and the remaining 5V connection was fed to E5V on the Nucleo board.

Kamil Duljas
Senior III

I think about this .... First at all, try enter to boot mode using jumper instead jump from program. We exclude errors in code

Dudo
Kamil Duljas
Senior III

ttyACM0 is the only one USB on list?

Dudo

Yes