2022-01-12 02:47 AM
Hi,
I am new to bootloader and firmware update concept. I would like to program bootloader and update firmware using UART. I have gone through datasheet and reference manual and understand that there are boot pin and nboot1 bit, nboot_sel bit and nboot0 bit. I don't want to consider Boot0pin. I want to use only option bits so that I could update firmware.
My question is how to program bootloader and application code. Do I need to use two development board, one for application and one for bootloader connecting via UART protocol. I hope for guidance.
Thank You
Regards,
Ashwinee
2022-01-12 05:39 AM
You can use the built-in bootloader or you can create your own. The built-in bootloader is described in this document:
If you create your own bootloader, you are of course free to choose whatever scheme you want.
There are many examples on how to erase/program the FLASH on the STM32G0. Here is one of them:
2022-01-12 06:43 AM
>>Do I need to use two development board, one for application and one for bootloader connecting via UART protocol. I hope for guidance.
No you'd partition your own code into two parts, both would need to fit.
You can't replace the ROM based System Loader, but you'd typically communicate with that from your Host computer, ie Windows/LINUX PC
If you need to pull the new firmware from a remote server, over WiFi, Cellular, etc, you'd likely need to provide some way to stage the new firmware, perhaps in an external flash or SD Card.
The UART protocol is described in AN3155.
For your own loader consider protocols with native support in terminal applications, ie X/Y-Modem, etc.
2022-01-12 10:37 PM
Thanks.
Above documents explain different commands. I need to send those command through uart and then I can update firmware if I will get required feedback from stm32g0 board.
Then I can download firmware update code including uart commands is that like this.
Till now I understand there is one bootloader code and one is application code. first i will download bootloader code in stm32g0 then what should I do?
How I will update firmware, does that firmware has uart communication command given in this document.
Please give me clear idea.
Thank You
2022-01-12 10:39 PM
Thanks.
I want to ask how to configure boot mode without using BOOT pin. And also when Bootloader mode is running and after code is updated so do I need to again change Boot mode configuration and how?
Thank again
2022-01-12 10:40 PM
Hi,
is their any sample code so that I can use and understand the things.
Thanks
2022-06-30 11:27 PM
How can I use the uart interface with a cpu uart interface