Skip to main content
Visitor II
January 10, 2020
Question

Can STM32 set it self to bootloader mode thru software

  • January 10, 2020
  • 2 replies
  • 1368 views

I am trying to get STM32 to set it self bootloader mode.

One processor that I am trying to do it with is stm32f070rb and the second is stm32f070x6.

I send command to each of them, and in their program I set RX Callback to handle this command.

here is example callback handle:

0690X00000BvqOcQAJ.jpg

stm32f070rb jump_to_bootloader function:

0690X00000BvqOwQAJ.jpg

stm32f070x6 jump_to_bootloader function:

0690X00000BvqPGQAZ.jpg

very weird thig is that stm32f070rb processor usualy set it self to bootloader mode, but sometimes it doesn't. But on stm32f070x6 processor it doesn't work at all.

Any idia why doesn't it work?

    This topic has been closed for replies.

    2 replies

    Graduate II
    January 10, 2020

    Shouldn't be calling from interrupt/callback context, that is for sure.

    Disabling the processor interrupts, also a bad plan. Identify where they get enabled again.

    Some STM32 don't allow for this if a valid image is seen in User Flash.​

    DKubiAuthor
    Visitor II
    January 10, 2020

    why is that? I thought that disabling interupts is a must to jump to bootloader.

    I did it with the use of https://stm32f4-discovery.net/2017/04/tutorial-jump-system-memory-software-stm32/ tutorial and there the author says that you have to do it. I also got tip from one guy from the group that I have to "Clear pending interrupts". Gonna check it on monday and give you an update!

    Graduate II
    January 10, 2020

    Would explain why that code keeps showing up...

    Clearing or stopping interrupt that you are firing is one thing, arbitrarily disabling on the whole processor needs undoing at some point.

    Identify where they get enabled again.

    Graduate II
    January 10, 2020