cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H523 hardware development problem

BW_TheExplorer
Associate II

Greetings. I am a beginner and an electronic student and I am currently getting my hands on STM32H523. I have created a mcu board in Altium Designer just to control LEDs by GPIO, hopefully to understand more about STM32. I have the PCB fabricated, and the connection for ST Link v2 is SWDIO---SWDIO, SWCLK---SWCLK, GND---GND. I have also connected a wire at the VCC and GND to the 3.3v power supply to power up the MCU. For Boot0, I set it to HIGH since I see people saying that to program the MCU, I need to set it to HIGH. 
I have soldered everything and connect the board to st link, and I cannot debug. I was hoping if anyone can give me some guide, and here I will attach my schematic so you may spot out any design errors... Thank you very much, understanding the STM32 means a lot to me as I intend to use them in my future advanced projects.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you so much! I have brought back good news... I managed to make it work (sort of) all in a sudden. This was how I made the connection:

ST-LINK         <->            MCU
SWCLK ---------------- SWCLK
SWDIO ----------------- SWDIO
GND ----------------------- GND
RST ----------------------- NRST

And with Boot0 set to be low, with 3.3V supplied to the MCU externally.
I don't need to press reset button to connect. The software recognize the mcu as long as I connect.
Result:
The chaser circuit did work in terms of behavior , except for a few LEDs, likely a soldering problem. But yeah, it did show me something haha. Now I am figuring out why I have to keep the ST link plugged to run the program... If I unplug the ST Link, the LED just stops blinking (the design is a chaser circuit btw) . I used the STM Programmer and IDE , they both recognized my stm32 mcu and st link. I exported the program as bin and hex file via the IDE and the programmer shows download successfully. But when I unplug the ST link and power up the MCU, the LED doesnt blink which means the program is not running. I am trying to figure out what is happening...

View solution in original post

12 REPLIES 12
TDK
Super User

BOOT0 should be pulled low to execute user code, including while debugging.

Schematic looks okay to me.

Can you connect to the chip with STM32CubeProgrammer? If no, show a screenshot of any error messages you receive.,

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

@BW_TheExplorer wrote:

I am a beginner ... hopefully to understand more about STM32.


Rather than leap straight into designing a board, I would strongly suggest that you start with a ready-made & supported board from ST; eg, NUCLEO-H533RE:

https://www.st.com/en/evaluation-tools/nucleo-h533re.html

That will give you a known-good, supported platform on which to gain familiarity with the product and the tools.

See: https://community.st.com/t5/stm32-mcus-products/for-better-learning-stm32-programming-and-debugging/m-p/719485/highlight/true#M260696

Having done that, it will also serve as a good starting point for your own design.

 

See also application note AN5711, Getting started with STM32H5 MCU hardware development.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Thank you for your quick response. I have actually bought a Nucleo h533re and got it work before I try. However, the board has a ST-link built in, as well as the type C power plug. It gave me a good starting point to get my hands on the STMCube and IDE, as well as some basic programming of GPIOs. But I still want to develop my own boards since some of my upcoming projects will require compact design. One of my school project next year is to build a mini-camera display, and I have made up my decision of using STM32 MCUs due to their powerful computation power. My problem is still stuck at the hardware development part, and I feel like I really need some guides. I found most of the online resources talking about development board and I am still trying to filter/ figure out useful information...

Hello, Thank you for your reply. I did try to connect it to the programmer (I even have the code ready, they are error-free) . Unfortunately, the connection is a failure. First, it shows No STM32 target . It did recognize my ST-Link. I am trying the combination of Boot0 high, boot0 low, and I have also tried using both 5V and 3.3V . But none of them got me connected. I am new to this so maybe my words are not very clear, if so, i do apologize for that. I am still checking my connections , hopefully to make sure it isn't hardware issues. If you need any other information to help me solve this problem, please do let me know. I will do my best to provide everything you need to identify/diagnose the problem. Once again, thank you so much for your approach!

 

-BW

Is the board properly soldered?

Chip orientation correct?

VCAP voltage around 1.2 V?

VCC voltage correctly reported in STM32CubeProgrammer?

 

No need to mess with BOOT0. It's not an issue as far as connecting to the chip. But you will want it pulled down when you eventually run code.

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

Thanks TDK! 
Thanks for listing out these potential problems , I will use this as a check list to try to resolve the problem. For now, 

1. The I am certain that the components are properly soldered , other than the STM32 , as I used the BGA version. Based on my observation, the chip sticks tightly with the PCB and I see no gap in between, which may be a good sign , but I cannot be certain.

 

2. The orientation is correct. I had a dot on the corner of the footprint and I made sure to solder the chip on the same side.

 

3. I will try to measure the VCAP. Is 1.2V the desired value I want? (Just in case I try different combinations of connections and get different readings)

 

4.If I am getting your point correctly, I see the programmer saying that target voltage is 3.2V.


And finally, thanks for the note on boot0. I will set it low forever (Connect boot 0 to the GND) then? 


Thanks again! 

UPDATE

I have measured the VCAP  with a handheld multimeter, and YES! The VCAP is measured to be 1.21V, very close to the value you mentioned. I hope this is a good thing? :)

FYI: I applied  3.3V to the mcu with a power supply when measuring. 

If you don't mind telling me more, why does it sound so important? I want to learn more ^^
My guess is... this is an indicator that the mcu is powered? Just a guess...

TDK
Super User

Yes. Just indicates core is powered correctly which eliminates a lot of potential troubleshooting issues.

Based on that information, I only see the following possibilities:

  • Wires are not connected properly. Possible due to bad solder joints, bad cable, bad crimp, whatever.

Hmm, yep that it. Clearly it's powered, clearly connection between computer and programmer is okay. Might be something H5-specific that I do not know, but if this is a new chip that hasn't been touched, don't think it's that.

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

Thank you so much! I have brought back good news... I managed to make it work (sort of) all in a sudden. This was how I made the connection:

ST-LINK         <->            MCU
SWCLK ---------------- SWCLK
SWDIO ----------------- SWDIO
GND ----------------------- GND
RST ----------------------- NRST

And with Boot0 set to be low, with 3.3V supplied to the MCU externally.
I don't need to press reset button to connect. The software recognize the mcu as long as I connect.
Result:
The chaser circuit did work in terms of behavior , except for a few LEDs, likely a soldering problem. But yeah, it did show me something haha. Now I am figuring out why I have to keep the ST link plugged to run the program... If I unplug the ST Link, the LED just stops blinking (the design is a chaser circuit btw) . I used the STM Programmer and IDE , they both recognized my stm32 mcu and st link. I exported the program as bin and hex file via the IDE and the programmer shows download successfully. But when I unplug the ST link and power up the MCU, the LED doesnt blink which means the program is not running. I am trying to figure out what is happening...