cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8Txxx custom board, glitches after few seconds

MDebo.1
Associate II

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.

12 REPLIES 12
TDK
Guru

Is BOOT0 pulled down? The schematic doesn't reflect the current state of the jumpers.

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

Yes, BOOT 0 is pulled down, it's with jummpers.

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.

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

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.

Sounds like it's resetting. Ensure the 3.3V rail is steady, probe the NRST pin to see if it's resetting. If those look good, attach a debugger and find out what the code is doing.
If you feel a post has answered your question, please click "Accept as Solution".

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

0693W000005BQVRQA4.pngIt 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.

What else does the code do, except blinking the LEDs?

Does it run from HSI or HSE?

JW

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()

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Normally HSE.

What I did is make a arduino project for blinking led en converted it in bin.

It just runs blinking the leds.