Skip to main content
Associate
June 26, 2024
Question

not able to program STM32h503rb

  • June 26, 2024
  • 2 replies
  • 3053 views

I have programmed all the pins of port A as GPIO input pins on my STM32H503rb. Now, I am not able to use the ST-link to reprogram anything into the microcontroller.
How do I reprogram it?

2 replies

kvganeshAuthor
Associate
June 26, 2024

Port A has pins to JTAG and USB. I do not if that is stopping me from reprogramming. Is there a way to reset the pins to their default state

 

Tesla DeLorean
Guru
June 26, 2024

If you strap BOOT0=HIGH your code will stop running, and the ROM based System Loader can be a safe harbour to get you back control. Use STM32 Cube Programmer to erase your code.

Connect-Under-Reset might help if you connected NRST to your debug header to facilitate that.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
AScha.3
Super User
June 26, 2024

You have to set SWD debug, using PA13/14 , to have debug working.

Just to program/flash the cpu, connect CubeProgrammer "under reset" + hardware reset .

Needs a real st-link (with working nrst), or try with these settings to connect, while press/holding reset.

Other way would be: set boot0 hi, and connect to bootloader . (read in rm.)

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