cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405RGT6 custom board connection issue with stm32cubeprogramer and stm32cubeIDE

rayboum
Associate III

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. 

Before taking any further steps to replace it, I decided to post a question here for review in case the problem was in my PCB design. And sure enough, I had misplaced the chip pin due to the faulty pinout diagram I used as reference.

I have since fixed the chip's orientation and rechecked all pad and pin connections, as well as the 3.3V supply, and found everything to be correct; yet I still cannot get the STM32 CubeProgrammer or IDE to connect with my board using the ST-Link V2 or a USB Type-C. 

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.

PROBLEM:

rayboum_3-1776108504557.png

BOARD:

 

5974353149042560499.jpg

 

 

8 REPLIES 8
Peter BENSCH
ST Employee

The serial number of your "ST-LINK/V2" shows only the letter E, so I assume that it is a clone that is not supported (see here).

Regards
/Peter

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.
mƎALLEm
ST Employee

Hello,

Apart from what @Peter BENSCH said, purchasing chips from AliExpress is not something recommended. Many people found their chips broken/not working from that site.

Better to purchase the parts from reliable distributors such as Mouser, Digikey etc ..

Also, perhaps the bad chip orientation you've adopted previously broke the chip?...

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.

Hello again. Sorry for taking so long; I had to find a working ST-Link V2 and tested it. You were right; the ST-Link was a nonfunctional clone. After using a different one that worked fine with the blue and black pill, I still get this error. if you have any idea of what it might be from, please share your thoughts

image.png

Peter BENSCH
ST Employee

@rayboum Good point: I only now looked at the photo and noticed that you apparently didn’t layout something correctly. The crystal is indeed connected correctly to pins 5 and 6, but at least the JTAG connector is apparently on the wrong pins.

[edit]Sorry, I was too quick, the JTAG looks connected correctly, but lets doublecheck your ST-LINK/V2: please insert a legible photo, front and back.[/edit]

Regards
/Peter

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.

Yes, here are the pictures.

rayboum_1-1776953961069.png

rayboum_2-1776953978103.png

I understand that the ST-LINK link I am using is still a cloned one. The one I used previously was completely faulty and didn't even work with the blue or black pill. The red one, on the other hand, belonged to a classmate of mine that used it to regularly program them, so I decided to use it before committing to buying this one, as it is somewhat expensive for a student budget (I still need to buy other components) and it's the only other ST-LINK model currently available in my country.

Now, if you think the red ST-LINK is incapable of programming anything other than the blue and black pill, and the ST-LINK presented in the picture below is my last option, I will buy it. So please understand, before exhausting all my options and making sure that using it will solve the problem, I can't spend what little I have left on it.

rayboum_0-1776953838746.png

 

To be sure of getting a genuine ST-Link, buy from an Official Distributor:

https://www.st.com/content/st_com/en/contact-us.html

 

PS:


@rayboum wrote:

if you think the red ST-LINK is incapable of programming anything other than the blue and black pill,


It's not that the red clone is incapable - it's that STM32CubeProgrammer and STM32CubeIDE do not support clones.

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.
Peter BENSCH
ST Employee

... or use one of the NUCLEO-64 boards, where you can break off the ST-LINK/V2-1 along the perforation, which you can recognise by the long groove. Such NUCLEO boards are generally cheaper than an ST-LINK/V2 - and always genuine (ST-LINK/V2 devices are also counterfeited, as @Andrew Neil wanted to indicate). You can take the cheapest NUCLEO-64 you can find - but make sure it has the ST-LINK/V2-1 and not the non-detachable ST-LINK/V3.

Good luck!

Regards
/Peter

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.

This will take too long. I have to present a working board by next Wednesday, and imported goods take around 2 weeks minimum to arrive.

I will try the Nucleo One, as the teacher I am presenting this to has some and hopfully he lends me one.