Skip to main content
Associate II
April 10, 2026
Solved

STM32F405RGT6 custom board connection issue with stm32cubeprogramer and stm32cubeIDE

  • April 10, 2026
  • 8 replies
  • 1250 views

Hello everyone.

I have recently made my own STM32 board based on the STM32F405. After soldering all the components and testing all pads and connections, finding them to be wired correctly and checking that the 3.3V is being supplied to all the correct pins, I tried to upload some code but to my shock the STM32F405 isn't establishing a connection via the ST-Link V2 nor the USB cable. After trying multiple fixes, I suspect the issue might be the STM32F405 chip that I got off AliExpress itself. 

So before I took any further steps to replace it, I decided to post my schematics on here for review in case the problem was in my PCB design. If you have any remarks on what might have caused this problem, please share them.

NOTE: The -B label is referring to ground, and P is the VCC.

schematics:

rayboum_0-1775845016444.png

rayboum_1-1775845042103.png

rayboum_2-1775845090587.png

 

 

Best answer by mƎALLEm

Don't rely on the CubeMx figure, it's just a photo.

Please check the datasheet / Figure 76. LQFP64 - Outline

mALLEm_0-1775855630289.png

And this is pin 1:

mALLEm_1-1775855673525.png.

In CubeMx: VBAT is indeed pin 1. But your reference of the package on the PCB is wrong.

mALLEm_0-1775856130578.png

8 replies

TDK
Super User
April 10, 2026

Schematic looks okay.

Is VCAP around 1.2 V?

Is the chip oriented correctly? Show a picture of the board.

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
rayboumAuthor
Associate II
April 10, 2026

VCAP at 1.2V? Do you mean the voltage across it? If so, I can't check it anymore since I just removed those caps to use them in a PCB that I need urgently done. As for the orientation, it's oriented correctly; I triple-checked. Here is a picture: IMG_20260410_193713_edit_486460115641916.jpg

Chris21
Associate II
April 10, 2026

I suspect Pin 1 is at the lower right corner in this picture, not the lower left like it needs to be.

Which way is the text on the MCU oriented?

 

rayboumAuthor
Associate II
April 10, 2026

Oh no, I clicked on "accepted as solution" instead of "reply." How do I undo this?

The PCB is oriented correctly; the text is just flipped 180 degrees since it's intended to be read from that orientation:

IMG_20260410_204734.jpgIMG_20260410_204814.jpgScreenshot_20260410_204438.jpg

mƎALLEm
Technical Moderator
April 10, 2026

Look at this post.

"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."
rayboumAuthor
Associate II
April 10, 2026

Ok, so from what I understand, this pinout diagram I followed is faulty, as pin 1 (VBAT in the STM32F405 case) is shown at the very top of the row next to the pin 1 indicator and not directly next to it. Is this correct?

Screenshot_20260410_204438.jpg

rayboum_2-1775855403925.png

 

Chris21
Associate II
April 10, 2026

Chris21_0-1775851207569.png

If the MCU labeling (text printed on the chip) is not right side up in your photo, pin1 is not at the lower left corner.

rayboumAuthor
Associate II
April 10, 2026

I followed this pinout diagram. Is it wrong?

Screenshot_20260410_204438.jpg

VBAT is pin 1.

rayboum_1-1775854991793.png

 

TDK
Super User
April 10, 2026

> VCAP at 1.2V? Do you mean the voltage across it? If so, I can't check it anymore since I just removed those caps to use them in a PCB that I need urgently done.

Yes.

> As for the orientation, it's oriented correctly; I triple-checked.

How exactly did you check?

The part is oriented wrong, *and* it is now missing VCAP capacitors. Both of these are showstoppers. You will have to fix both of those. It is possible there are other issues. The soldering does not inspire confidence, but the picture is too blurry to spot any particular issues.

"If you feel a post has answered your question, please click ""Accept as Solution""."
rayboumAuthor
Associate II
April 10, 2026

Yeah, the VCAP will have to wait until I buy more since I urgently need them, and I only had those 2. But when they were still on this board (4 hours ago), the problem mentioned was still persisting.

For the orientation, I followed this schematic I found: 

Over here we can see that pin 1 is VBAT:

rayboum_0-1775854115138.png

Following this schematic, pin 1 is directly above the smaller identifier:

Screenshot_20260410_204438.jpg

According to my PCB layout, pin 1 is to the bottom right of the stm32F405 lable:

IMG_20260410_204814.jpg

And that means it's the bottom left first pin in this picture since it's turned on its right side, and we can see the smaller identifier is under that row of pins, so I think it's oriented correctly unless the first schematic is wrong:

IMG_20260410_204734.jpg

Chris21
Associate II
April 10, 2026

VBAT is pin 1.  But where is pin 1 on the package?

Read my previous post.

rayboumAuthor
Associate II
April 10, 2026

Yeah, I have read it seems that the pinout diagram i followed was wrong, as pin 1 VBAT is shown to be at the very top of the row that's next to the PIN indicator instead of next to it and i found this other diagram that seems to confirm my suspicions:

-the faulty one I used:Screenshot_20260410_204438.jpg

- the one from the Utmel website and the STM32CubeMX interface:

rayboum_0-1775855942390.png

rayboum_1-1775855947741.png

 

Chris21
Associate II
April 10, 2026
Chris21
Associate II
April 10, 2026

Personally, I don't think that datasheet is very clear.  TN1433 (Reference device marking schematics for STM32 microcontrollers) is better:

Chris21_0-1775855907987.png

Especially as the datasheet also has this:  

Chris21_0-1775856334974.png

which could be misinterpreted.