cancel
Showing results for 
Search instead for 
Did you mean: 

Programming NucleoG474RE via bootloader

EliazLB
Associate III

Hello,

I am currently trying to program a nucleo board using USART. For this I am using the bootloader and Cube Programmer. 

I first developed a program and tester it by programming via st link. My program worked with no problem. I then tried to program using UART. 

I was able to connect but as soon as I started programming, I get the message Error :GETID command not acknowledged and then the nucleoboard is disconnected.

EliazLB_0-1747657347296.png

Here are my settings and the boot0 pin is tied to 3.3V.

When I program I can see on the oscilloscope that some part of the program is on and working but not fully as well.

Any idea ?

 

Thanks very much

 

1 ACCEPTED SOLUTION

Accepted Solutions

This is normal behavior since the application starts running after flashing. The device disconnects because the bootloader is no longer active; the application is now running instead.

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

10 REPLIES 10

Try a lower baud rate.

You get one shot per reset to communicate with the device and have it auto-baud the 0x7F data pattern.

Perhaps use something like Real Term to send/show HEX BYTES, and send the pattern manually, and check for 0x79 response code.

Disturbances to other pins noted in AN2606 may also be recognized as first-contact, so check the pins/uart you are involving in your test/evaluation

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

Double-check the UART wiring between the Nucleo and the USB-to-Serial converter or the host:

  • TX from USB-Serial → RX of STM32

  • RX from USB-Serial → TX of STM32

  • GND connected between both boards

I've tried both 9600 and 1200 bauds but it doesn't change a bit.

And I've tried using Real term but it doesn't seem to work either.

I've checked with one of the example to use USART via hyperterminal and that seems to work.

Maryem
ST Employee

Hello @EliazLB ,

 

I attempted to reproduce the issue on my end, but everything seems to be working fine.

Maryem_0-1747996373319.png

Could you please provide the bootloader version ? Additionally, if possible, could you share your binary file? 

 

Thank you,

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
EliazLB
Associate III

Hi,

The bootloader protocol version is 3.1 if that's what your asking for.

I saw a slight difference between your settings and mine which is that you didn't check the "run after programming" box. I tried to program the nucleo without the box checked and there was no problem. But as soon as I pressed the reset button I got the same problem as earlier.

So the problem might come from my code.

I've attached the binary file I'm programming onto the nucleo.

 

Thank you

Thank you for your feedback.

Actually, I was referring to the bootloader information you can find when connecting the target via ST-Link.

Maryem_0-1747998408427.png

Also, thanks for pointing out the "Run after programming" option being enabled. 

Could you please confirm whether you receive the message "File download complete" before encountering the error message?

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
EliazLB
Associate III

Here is all the informations : 

EliazLB_0-1747998836045.png

 

I do get both messages :

- "download verified successfully"

- "File download complete"

And after both messages are closed does the error message appear.

 

EliazLB
Associate III

Ok, I don't know why I never checked it, but despite the error message, the program appears to be working. 

I tried with the example GPIO_IOToggle and the led turns on and off as it is supposed to...

The reset buttons seems to be working but only once out of every 10 times I press it.

This is normal behavior since the application starts running after flashing. The device disconnects because the bootloader is no longer active; the application is now running instead.

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.