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-26 12:09 AM
Will try this out
2023-04-26 12:40 AM
2023-04-26 03:31 AM
2023-04-26 11:43 PM - edited 2023-11-20 07:13 AM
@newbie_stm32 Some success?
Look at my settings:
You have simmilar board. try use jumper to connect. My result:
2023-05-03 02:01 AM
Hi @Kamil Duljas, it did work for me. But when I tried it one more time, I got the same error message as shown before. I can assure you that connecting the BOOT0 pin to 3V3 and pressing RESET is keeping the MCU in the boot from system memory as there is blink code flashed to MCU with which after pressing RESET is not executing.
PS: I flashed using the system bootloader and immediately after that without disconnecting BOOT0 pressed RESET. After which I am not able to flash again using the system bootloader.
2023-05-03 02:04 AM
Show me your connections
2023-05-03 02:17 AM - edited 2023-11-20 07:13 AM
Here it is
2023-05-03 02:20 AM
Try use only 4 cables. Tx Rx gnd vdd from green pcb
2023-05-03 02:23 AM
It's 4 only rather than connecting it to VDD (orange cable), I connected it to 5V at jumper.
2023-05-03 02:32 AM
Ok so now, what's the problem? I'm lost :D