cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 embedded bootloader problem

vlpasha
Associate II
Posted on January 22, 2015 at 09:46

Can`t start the STM32F407VG chip in bootloader mode via USB. On the Discovery board all works fine if i set the boot0 and boot1 pins to boot from system memory. The device is enumerated in Windows as STM Device in DFU mode.

On our custom board with the same chip, same external crystal (8MHz), and mainly same USB schematics (excluding EMI filter), after setting boot0 and boot1 pins to boot from system memory, the device fails to enumerate and is detected as Unknown device. (But the USB HID class in our software works fine). Tried to jump to bootloader using following function, invoked after reset and system initialization:

void
BootLoader(
void
)
{
void
(*SysMemBootJump)(
void
) = (
void
(*)(
void
)) (*((uint32_t *) 0x1FFF0004));
__set_PRIMASK(1);
RCC_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
//RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);
__set_MSP(0x20001000);
SysMemBootJump();
}

after that our device and Discovery board fails to enumerate and is detected as Unknown device. Is there any special care to be taken for the bootloader to detect and use USB in DFU mode?
3 REPLIES 3
Posted on January 22, 2015 at 11:05

Is there any special care to be taken for the bootloader to detect and use USB in DFU mode?

Yes, probably the mapping of the ROM at ZERO?

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Calling%20stm32429I-Eval%20Bootloader&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=33

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/jumping%20to%20the%20bootloader%20via%20software%20does%20not%20permit%20dfu%20mode&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=330]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2Fjumping%20to%20the%20bootloader%20via%20software%20does%20not%20permit%20dfu%20mode&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=330

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vlpasha
Associate II
Posted on January 22, 2015 at 11:37

Worked like a charm.

Many thanks clive1. Sorry for bringing the question that was answered before...
Posted on January 22, 2015 at 11:44

Worked like a charm. Many thanks clive1. Sorry for bringing the question that was answered before...

Not to worry, the search here is awful, and if you knew the right keyword to search for you'd probably already understand the nature of the solution.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..