cancel
Showing results for 
Search instead for 
Did you mean: 

Calling the STM32 SystemMemory Bootloader

johannes23
Associate II
Posted on February 03, 2014 at 16:53

I'm trying to launch the SystemMemory Bootloader on a STM32F4 as documented in this video:

http://www.youtube.com/watch?v=cvKC-4tCRgw

The PC detects a new device on USB but it does not enumerate.

Using the Boot0 pin to get into the bootloader works fine, and USB detects the DFU.

I'm using ChibiOS/GCC, but even launching the bootloader before calling halInit() and chSysInit() does not help.

Any idea?

#bootloader #stm32 #stm32f4-bootloader
6 REPLIES 6
Posted on February 03, 2014 at 17:35

Any idea?

Do you have the DFU driver loaded?

It's definately possible to initiate the System Loader from an application, I've done it from close to boot conditions (ie no interrupts, HSI clock, ROM mapped at zero)
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
johannes23
Associate II
Posted on February 03, 2014 at 18:49

ROM mapping at zero, good point. I added

SYSCFG->MEMRMP |= 0x01;

but still no USB enumeration. It works with the boot0 pin strapped, so it is not a driver or board issue. Interrupts disabled, and HSI is clock source.
b_
Associate II
Posted on April 10, 2014 at 15:39

Hi

I experience exactly the same problem.

Calling the bootloader with the YouTube Code gives me an unenumerated USB device.

Using the Boot pin work fine.

johannes23
Associate II
Posted on June 05, 2014 at 07:40

Gentle bump, I still could not get this to work...

kostadin
Associate II
Posted on July 25, 2014 at 09:48

I also had the exact same problem. I could solve the issue if I comment this line:

//__set_PRIMASK(1);

I am however not so sure, it this is the right way to do this.
Posted on July 25, 2014 at 16:32

For RTOS implementations where the code is operating in User mode rather than System mode, I'd recommend using an SVC implementation.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Jumping%20to%20Application&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=213]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FJumping%20to%20Application&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=213

Where you'd change the application address to the base of the ROM

There are other thread where I have demonstrated how to enter the F2/F4 ROM's with the right settings to get the USB DFU functionality working.

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