Confusion about correct pinout of stm32f103rct6 - Page 1
Forum section: electronics / general

author: teslinius
author_rank: Regular Contributor
timestamp: April 26, 2022, 08:55:14 pm
content: I made a custom pcb for stm32f103rct6 microcontroller, and i soldered it as by the pinout on easy eda, a lot of weird problems appeared like crystals not oscillating, uc just randomly turning outputs on and off, and just goin crazy after a certain time, it has to be noted that i have an led connected to pa8 pi which i just programmed to fade which weirdly worked but only for some minutes the it went crazy, then i did some more investigating and found out that there are conflicting pinouts of the uc's the ones on easy eda are different from those shown in the datasheet, so i'm confused what the correct pinout is, of course i trust the datasheet more but the one thing that bugs me is why the led worked? while the uc was soldered "in the wrong orientation", in the picture included is a picture from easy eda and official datasheet which clearly show conflicting pinout. And a picture of the uc pads.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 26, 2022, 09:18:30 pm
content: Trust the datasheet, and ensure the pin 1 marking is correct, it's easy to rotate it by mistake.

author: anda3243
author_rank: Contributor
timestamp: April 27, 2022, 02:23:47 am
content: Also if it is a fake chip, and not pin to pin compatible with the original.

author: newbrain
author_rank: Super Contributor
timestamp: April 27, 2022, 05:56:42 am
content: Call me blind, but I don't see any conflicts at least in the attached pictures.Am I missing the obvious?

author: darkspr1te
author_rank: Frequent Contributor
timestamp: April 27, 2022, 06:53:17 am
content: Quote from: teslinius on April 26, 2022, 08:55:14 pmThere may be other possible causes like missing pull up/pull downs, i would compare your board to a blue/blackpill schematic and just be sure you have them all tied up or down, if left floating it will produce results like you describe.darkspr1te

author: teslinius
author_rank: Regular Contributor
timestamp: April 27, 2022, 08:20:29 am
content: Quote from: newbrain on April 27, 2022, 05:56:42 amWell in easy eda footprint is showing for example the osc pins are at the bottom, while the datasheet, assuming the dot is where i drew it show the osc pins are on the left side.

author: teslinius
author_rank: Regular Contributor
timestamp: April 27, 2022, 08:23:43 am
content: Quote from: darkspr1te on April 27, 2022, 06:53:17 amYeah, but i checked reference schematics and my design seems ok, boot0 and boot1 are sellectable (pulled up or down), nrst has an internal pullup but i also put an external and a decoupling cap, all supplys are connected, not sure.

author: newbrain
author_rank: Super Contributor
timestamp: April 27, 2022, 09:35:02 am
content: Quote from: teslinius on April 27, 2022, 08:20:29 amI still don't see a difference. The pin numbers and functions match and they are numbered correctly, anticlockwise (from above) starting from the dot (which is always in the corner close to pin 1, regardless if it's shown or not)) in both pictures, it's just that the chip is rotated +π/2 in the EasyEDA picture (and -π/2 in the last one).How can that make a difference?

author: westfw
author_rank: Super Contributor
timestamp: April 27, 2022, 11:04:43 pm
content: QuoteThe dot marks pin 1. Your drawing has it pin 16!The datasheet puts pin1 in the upper left corner, and the easyEDA part seems to have it in the lower left corner, at least as show in the OP. But overall the pin numbering seems consistent.(which gets back to the question that several people have asked: are you sure the chip is mounted on the PCB with the correct orientation?)(Note that printing on the chip does not always match the Pin1 orientation in ways that you would expect.)

author: Doctorandus_P
author_rank: Super Contributor
timestamp: April 28, 2022, 02:00:19 am
content: the pin 1 mark also is not always obvious.Sometimes marks from ejector pins can be mistaken for a "pin 1 mark".

author: teslinius
author_rank: Regular Contributor
timestamp: May 08, 2022, 09:34:09 pm
content: Thanks for the replies, i'm not confused anymore, just because there wasn't a dot marked on the uc in the datasheet i got confused, they should add that.

author: tepalia02
author_rank: Regular Contributor
timestamp: May 09, 2022, 02:23:25 pm
content: Good to know your progress. Always trust the datasheet.