2
\$\begingroup\$

I'm trying to run my first circuit with a STM32 microcontroller. For debug reasons I soldered a minimum setup.

  • No external crystal
  • Only capacitors

I connect SWD Debug:

  • NRST
  • SWDIO
  • SWCLK
  • Power 3.3V
  • GND

I still cannot connect to the board. Is the crystal mandatory to run a program?

STM32F446RETx Datasheet

schematic

UPDATE, simplified version of PCB:

Front side

Back side

\$\endgroup\$
13
  • \$\begingroup\$ I count 4 decoupling caps, but 6 voltage inputs at different ends of your package. Your MCU might just brown out due to insufficient decoupling. \$\endgroup\$ Jan 13, 2021 at 19:38
  • \$\begingroup\$ by the way, your current JP1 symbol suggests you're shorting +3.3V to ground through that jumper. I'm sure you're not doing that in practice, but better point out what might be. Could you add a picture of the board layout, or a photo of the finished board, in addition to the schematic, to help us guess what's up? \$\endgroup\$ Jan 13, 2021 at 19:41
  • \$\begingroup\$ Thanks Marcus, ok I didn't know I would need one for each entrance. || I used the wrong symbol for the jumper, it actually tired to the ground for flash debug \$\endgroup\$
    – Yann
    Jan 13, 2021 at 19:43
  • \$\begingroup\$ note that this was a guess – please, really add a picture, so that we can have more educated guesses. \$\endgroup\$ Jan 13, 2021 at 19:44
  • 1
    \$\begingroup\$ @Yann the debug header are the least of your problems. \$\endgroup\$ Jan 13, 2021 at 20:37

3 Answers 3

4
\$\begingroup\$

oh my, that's not an appropriate board layout. Glad I insisted on a picture!

Your ground return paths are nowhere near your supply lines, your trace layout is random, to put it mildly, and your decoupling caps are too few and partially not where they're needed.

Redo that design.

  1. Put the capacitors directly adjacent to the supply pins. No exceptions.
  2. Bottom plane is a ground plane, no exceptions, no signals running on bottom. You don't actually need both layers to lay out the traces for a schematic this simple. Even in a much more complex schematic, keep the bottom side clean and only use it as a ground plane, because you need that to carry high-speed return currents.
  3. I don't know what happened to your traces, but it looks you really made a sport out of putting them in random places, with random kinks, and unnecessary bends and detour. Don't. This introduces problems. Do the straightest (vertical and horizontal only) shortest path from source to destination. Ground is not something you want to execute as squiggly trace that crosses sites. Even if this is a result of taking a complex board and deleting everything but the MCU, it wouldn't be good enough.
\$\endgroup\$
2
  • \$\begingroup\$ I removed the other part, so it 's more visible \$\endgroup\$
    – Yann
    Jan 14, 2021 at 10:26
  • \$\begingroup\$ as said in 3: even if this is just the remnants of a more complex board, this is not good enough, sorry. \$\endgroup\$ Jan 14, 2021 at 11:41
1
\$\begingroup\$

According to STM32F446RETx Datasheet:

3.13 Clocks and Startup: "On reset the 16 MHz internal RC oscillator is selected as the default CPU clock. The 16 MHz internal RC oscillator is factory-trimmed to offer 1% accuracy at 25 °C. The application can then select as system clock either the RC oscillator or an external 4-26 MHz clock source."

Some microcontrollers require setting up some non-volatile configuration bits to configure the system clock source (Atmel ATmega328 has "FUSE" register for example). But based on this paragraph in the datasheet, it looks like STM32F does not require an external crystal for basic operation.

Note that 1% clock accuracy will be a performance limitation for some types of communications. Normally we only use crystal-less configuration in high-volume, cost-sensitive applications... crystals are not that expensive and having a stable clock helps eliminate many types of problems. If you have not built this PCB yet I would recommend at least putting in the option of using an external crystal, even if you initially leave it unpopulated.

\$\endgroup\$
-1
\$\begingroup\$

maybe you should start with an adaptör like this at first you add connection with stm32 and a white board. and than you will test your minimal connection. you will try your system without paying and waiting for manufacturing a PCB

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Can you explain how this answer is helpful? \$\endgroup\$
    – Justme
    Aug 9, 2023 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.