2025-09-04 5:24 PM
Hi, I'm getting started at embedded programming, I've got this blue pill board having the STM32F103C6 MCU and ST-LINK v2 programmer.
Here's my code, just to light up the LED on port C 13:
Despite the IDE flashes successfully the LED doesn't light up as I wanted, It will only lights up if I add a break point on debugging mode on Keil uVision
And here are my flash configurations:
Any help is appreciated.
2025-09-04 7:04 PM
Replace return 0; with while(1){}
2025-09-04 7:08 PM
It didn't work
2025-09-04 7:23 PM
Try to comment out GPIOC->BSRR = (1<<13);
2025-09-04 7:29 PM
It looks like your coding in assembly language? You don't have any comments on the lines of code for what they each do. But if the LED works in step mode in debugging then your program is probably ok but when you run it it runs too fast for human eyes to see it. It only blinks once and then your program ends. If you want to see a constant blinking you need to slow down the blinking like: LED on, delay, LED off. Also, put the code in a forever loop if you want it to blink ... forever instead of just once.