cancel
Showing results for 
Search instead for 
Did you mean: 

Can STM32 set it self to bootloader mode thru software

DKubi
Associate II

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?

5 REPLIES 5

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.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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!

Piranha
Chief II

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

why would I want to do that?

If I set processor to bootloader, uptade the program that is on it, and reset manualy the procesor doesn't interupts start again?