2023-04-25 03:34 AM - edited 2023-11-20 07:12 AM
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
Why is the firmware upgrade not working?
2023-04-25 05:26 AM - edited 2023-11-20 07:13 AM
First check hw mode
after this work try jump into.
2023-04-25 08:13 AM
Have you valid settings of UART connection? 9600 baudrate and parity even? Power from UART also connected?
2023-04-25 10:13 PM - edited 2023-11-20 07:13 AM
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.
2023-04-25 10:35 PM - edited 2023-11-20 07:13 AM
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
2023-04-25 11:48 PM
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.
2023-04-26 12:01 AM
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.
2023-04-26 12:05 AM
I think about this .... First at all, try enter to boot mode using jumper instead jump from program. We exclude errors in code
2023-04-26 12:07 AM
ttyACM0 is the only one USB on list?
2023-04-26 12:09 AM
Yes