Flashing firmware using System Bootloader and STM32CubeProgrammer on Nucleo-G491RE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-25 3:34 AM - edited 2023-11-20 7: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?
- Labels:
-
STM32CubeProgrammer
-
STM32G4 Series
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-26 12:09 AM
Will try this out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-26 12:40 AM
- Additional tip: Add HAL_DeInit(); after HAL_RCC_DeInit();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-26 3:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-26 11:43 PM - edited 2023-11-20 7:13 AM
@newbie_stm32 Some success?
Look at my settings:
You have simmilar board. try use jumper to connect. My result:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-03 2: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-03 2:04 AM
Show me your connections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-03 2:17 AM - edited 2023-11-20 7:13 AM
Here it is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-03 2:20 AM
Try use only 4 cables. Tx Rx gnd vdd from green pcb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-03 2:23 AM
It's 4 only rather than connecting it to VDD (orange cable), I connected it to 5V at jumper.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-03 2:32 AM
Ok so now, what's the problem? I'm lost :D
