STM32F072 USB Firmware Update
I am using an STM32F072 MCU in my project and in the development phase, things seem to be working properly. The boot0 pin is pulled low and I can upload firmware via the ST-LINK debugger.
- When the product is released to the costumer, there are two possible ways to issue a firmware update. (1) USB (2) UART
- USB: Since the USB DFU bootloader resides in the system memory, and I need to pull the Boot0 pin high in order to access it, it does not seem to be a viable option for future firmware upgrades.
- UART: One of the UART is interfaced with a bluetooth module and I can issue an OTA firmware upgrade but again, the Boot0 pin needs to pull high in order to access the system memory where the bootloader resides
Q1: How do I issue a firmware upgrade without the need to make any changes to the Boot0 pin? My understanding is that I need to write a custom bootloader and place it in the flash memory that can be accessed upon power on since Boot0 will be tied low in the final product.
Q2: I also know that instead of writing my own bootloader, I can jump to system memory directly from the flash memory by reading a register value upon power on. However, I need to disable all the peripherals, clocks, interrupts and generally doing that is difficult and causes unexpected issue. Am I right here?
