We developed a product which uses STM32F series and everything works fine. For some reason, we need to swap the F serie to G serie for future products.
Unfortunately, we do not manage to flash the virgin device (STM32G070CBT6) through USART1 (PA9/PA10) using stm32flash. The error message says "failed to init device". We also tried to write to the option bytes (address 0 x 1FFF 7800) so that the boot is targeting the System Memory, but doing this results in the same error message. So here are the questions:
- What is the proper timing and correct "enter bootloader mode" sequence for NRST, PA14-BOOT0-pin before sending the first byte over USART1 (PA9 and PA10)? Currently we use NRST-low, BOOTpin-high, NRST-high, run stm32flash, NRST-low, BOOTpin-low, NRST-high with 1s delay between each action.
- At this point, we are not sure if the pins we are toggling are configured to listen to that function. In stm32 G series, the boot pin is now merged with SWDCLK pin and the function is selectable through the nBOOT_sel register. How can the register be set if we are not able to program the device yet?
- We detected an issue with the shared pin BOOT0 / SWDCLK. BOOT0 is either driven by our HOST-CPU or the JTAG-debugger. We need to cut the connection in order to run either. Can you please provide us a schematic in order to be able to use it at the same time?
Any other suggestions that might alleviate the problem?
Thanks a lot in advance
Astrid