2020-11-15 06:07 AM
Hello everybody,
I made for school a custom stm32f103C8Txxx board.
Programming with a ST-Link V2 work without a problem.
To test the pcb, there are 2 led's (pin pc13 en pa10), they both illuminate every 500ms (easy code to test functionality).
The code wil run, for a few seconds and then glitches and does not respond... even after reset, it will glitch instantly.
If I dissconnect power for a minute, it will work again, but only for a few seconds and then glitches again.
Any ideas what it could be?
I added the schematic for everyone to see (don't mind the usb-c stuff, those components are not place on the pcb)
Edit 1:
Boot 0 and Boot 1 are determined with jumpers. Some parts of the schematic are based on the blue pill.
2020-11-15 07:32 AM
Is BOOT0 pulled down? The schematic doesn't reflect the current state of the jumpers.
2020-11-15 08:00 AM
Yes, BOOT 0 is pulled down, it's with jummpers.
2020-11-15 08:30 AM
You may need to clarify what "glitches" means. Attach a debugger, figure out what is happening within the code when the glitch occurs. If it's truly random, seems like a power supply issue. I don't see any other issues in the schematic. Didn't check that the crystal load capacitors are appropriate. You're missing a bulk ceramic capacitor, although I'd be surprised if that was the cause.
2020-11-15 08:40 AM
By glitches, I mean that the alternating sequense of the leds turning on and off do not work anymore. It just freezes, the led on pc13 does flickers, but way faster than the normal 500ms on/off sequense.
All the components for power are on a different schematic.
I do power it by only the st-link v2 programmer if that gives anymore information.
2020-11-15 08:48 AM
2020-11-15 09:05 AM
First, thanks for the help.
Here is a scoop image:
ch1 is reset
ch2 is the 3V3 rail, it is 3.44V but stil under the 3.6V
It has been running for 5 min and still no changes on ch1 and ch2.
Tested the reset and works how it should work when you pull it down.
2020-11-15 12:58 PM
What else does the code do, except blinking the LEDs?
Does it run from HSI or HSE?
JW
2020-11-15 01:10 PM
PC13 is not designed for large currents, it is in the low power domain.
As there is no activity on NRST, will assume the core isn't resetting it self, and you need to look more critically at your code, and if it ends up in the Error_Handler() or HardFault_Handler()
2020-11-15 01:41 PM
Normally HSE.
What I did is make a arduino project for blinking led en converted it in bin.
It just runs blinking the leds.