cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 not working on custum pcb

liliane
Associate II

Hi,
I created a custum PCB based on STM32L431RCT6,
The debugger find the MCU and my code transmitted to my stm32 successfully,
even variables are shown in debugger live section.

But .. stm32 could not do some simple work suck as "blinking a led"
using debugging technics it turns out that mcu could not do a single operation inside while loop
I tried this but nothing:

  1. Use the same code that works on other stm32
  2. Check for pcb routes connections 

here is my main.c 

10 REPLIES 10
Rodo
Senior

Can u show your schematic?

gsaishivareddy
Associate II

I think there is something wrong with your PCB, can you share your schematic?

Schematic_HarmonyTechnology.png

liliane
Associate II

Schematic_HarmonyTechnology.png

BOOT0 needs to be GND by default, high will usually force the built-in bootloader to run (depending on config bits).

JTP1
Lead

Agree. Also the Reset switch should be grounding, parallel to C9. Now it doesnt do anything since there is also internal pullup in the NRST line.

gbm
Lead III

Is AVdd the same as Vin? It should be, otherwise the circuit will not work.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Bob S
Principal

2nd look - you may need Vin connected to the VBAT pin, I don't recall if that can be left floating.  Also, you have no bypass caps on the STM32 chip's VDD pins.

come on - Vin is 12 V , kill every cpu.

Vbat goes to lipo battery, nothing else.

AVdd goes to Vdd , 3.3 V , nothing else. otherwise cpu is dead. (so if already connected, to vin, use new cpu.

this one is very dead . )

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