2023-06-18 08:13 AM
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:
here is my main.c
2023-06-18 10:07 AM
Can u show your schematic?
2023-06-18 10:23 PM
I think there is something wrong with your PCB, can you share your schematic?
2023-06-20 03:43 AM
2023-06-20 03:45 AM
2023-06-20 08:18 AM
BOOT0 needs to be GND by default, high will usually force the built-in bootloader to run (depending on config bits).
2023-06-20 08:53 AM - edited 2023-06-20 08:54 AM
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.
2023-06-20 10:39 AM
Is AVdd the same as Vin? It should be, otherwise the circuit will not work.
2023-06-20 10:55 AM
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.
2023-06-20 11:24 AM - edited 2023-06-20 11:25 AM
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 . )