Skip to main content
RK.10
Associate
Jun 11, 2021 4:32 AM UTC
Solved

How to change the controller from IAP mode to ISP

Hi,

I have a system that is packed entirely. I have only a USB port and reset pin for my access. Now, How can I move the controller from In-Application Programming mode to In-System Programming mode?

This topic has been closed for replies.
TDK
TDKBest answer
Jun 14, 2021 2:51 PM UTC

See this for how to jump to the bootloader in software:

https://stm32f4-discovery.net/2017/04/tutorial-jump-system-memory-software-stm32/

Should be similar (probably identical) for the STM32G0 series. Note that the bootloader assumes the chip is in a reset state, so some periperphals/interrupts need disabled first.

You could also set the boot option bytes to jump to the bootloader on reset, then reset the device.

"If you feel a post has answered your question, please click ""Accept as Solution""."

5 replies

TDK
Jun 11, 2021 2:08 PM UTC

Not quite sure what you mean, but if the USB is a supported bootloader peripheral for your unknown chip, you could jump to the bootloader and use USB to program it.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RK.10
RK.10Author
Associate
Jun 14, 2021 1:04 PM UTC
Hi,TDK <> Thanks for the answer, I am using the STM32G070KB chip.USART1 bootloader is supported. As per the AN2606 note, 0x1FFF0000 is the address of the bootloader. I am moving to the bootloader section by Pattern 11(erasing the first page). Is there any other way to move to bootloader address( 0x1FFF0000) from the main code(Main flash memory code)? I am using C language in Keil Vision 5 .
RK.10
RK.10Author
Associate
Jun 14, 2021 3:26 AM UTC

Hi,TDK

Thanks for the answer, I am using the STM32G070KB chip.USART1 bootloader is supported. As per the AN2606 note, 0x1FFF0000 is the address of the bootloader. I am moving to the bootloader section by Pattern 11(erasing the first page). Is there any other way to move to bootloader address( 0x1FFF0000) from the main code(Main flash memory code)? I am using C language in Keil Vision 5 .

TDK
TDKBest answer
Jun 14, 2021 2:51 PM UTC

See this for how to jump to the bootloader in software:

https://stm32f4-discovery.net/2017/04/tutorial-jump-system-memory-software-stm32/

Should be similar (probably identical) for the STM32G0 series. Note that the bootloader assumes the chip is in a reset state, so some periperphals/interrupts need disabled first.

You could also set the boot option bytes to jump to the bootloader on reset, then reset the device.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RK.10
RK.10Author
Associate
Jun 15, 2021 11:28 AM UTC

Thanks TDK.