cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2 Bootloader question

RCola.2
Associate II

Hi, i'm Roberto.

In my Project i need to update firmware from USB. I wrote a code that when i send a command (a determinated string) from my PC to my board by USB, the code jump from my application to the bootloader address so i can update my firmware and using the DFU Bootloader.

My code works well with the demo board STM32F207-NUCLEO but the same code doesn't work with my custom board (i think that in my custom board, code jump to booloader but then it restart and return in my application code).

The marking on the chip of my Nucleo is: STM32F207GT6U

in my board is: STM32F207GT6

It could be a chip revision problem? What means the last letter 'U' on Nucleo Chip ? What means: "Software Option" on Ordering information code (see Figure) ?

 

Thank you for your help.

Roberto C

RCola2_0-1692863563561.png

 

 

11 REPLIES 11
Pavel A.
Evangelist III

While you're waiting for more useful replies: if you connect a virgin non-programmed MCU to USB, does the host see the DFU device? if you connect it to UART used by the bootloader, will the host see the bootloader prompt? In other words, are there any traces of the bootloader present?

TDK
Guru

> My code works well with the demo board STM32F207-NUCLEO but the same code doesn't work with my custom board

Okay, so perhaps a hardware issue? But your custom board initializes and uses USB okay? Can you share the schematic? Does your custom board use HSE with an appropriately valued crystal?

 

The "U" suffix is a part number that is only found on ST boards. I believe it's due to a licensing issue, but it's the same chip as the non-"U" version and isn't the source of the problem. Lots of threads on this, none with definitive answers from ST as far as I can see.

https://community.st.com/t5/stm32-mcu-products/here-we-go-again-with-suffixed-parts-stm32g474ret6u/m-p/279317

 

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

Hi Pavel.

I tried to set BOO0 and BOOt1 for Bootloader startup.

My PC find the Nucleo Board and enumerate the USB: "STM32 BOOTLOADER".

In my custom board, PC try to enumerate the USB port but can't do this. I think the board, with this settings, restart continously because PC try to connect with peripheral and then disconnect it.

I don't think it's hardware problem because in my application the USB works well. I'have the USB problems only with bootloader.

Thankl you for support.

 

Roberto

Hi TDK.

I don't think it's hardware problem because in my application the USB works well. I'have the USB problems only with bootloader. 

I have a crystal oscillator 8MHz : ECS-250-18-30-GM-TR and 4.7pF capacitor.

Thank you for link, i try to do this.

TDK
Guru

Is there chatter on other bootloader-connected pins that would cause the chip to initialize those interfaces before USB?

> I don't think it's hardware problem because in my application the USB works well.

Okay, but the bootloader works on a nucleo board and not your custom board. Wouldn't that suggest it could be related to differences in hardware? But yes, should be working with an 8 MHz crystal.

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

> I have a crystal oscillator 8MHz : ECS-250-18-30-GM-TR and 4.7pF capacitor.

This is a 25 MHz crystal, not 8 MHz, and 4.7pF is certainly not the right load capacitor for it, should be closer to 25 pF.

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

I'm so sorry for my mistake. It was the part number of Ethernet oscillator.

The correct part number is: NX3225GD-8MHZ-EXS00A-CG04874 and the capacitors are 4.3pF  X8R

Thank you again.

 

Roberto

Pavel A.
Evangelist III

Then it looks like your board is not compatible with built-in bootloader. Having your own bootloader is more reliable and gives more control.

RhSilicon
Lead

In my Project i need to update firmware from USB. I wrote a code that when i send a command (a determinated string) from my PC to my board by USB, the code jump from my application to the bootloader address so i can update my firmware and using the DFU Bootloader.

My code works well...


Just out of curiosity, does your application also use USB Host? I had issues with that.