Skip to main content
This topic has been closed for replies.

6 replies

waclawek.jan
Super User

Start with something simpler: set the pin where the LED is to GPIO Out, and set it to 1, and you should see that LED is ON (if it's connected through resistor to GND). Try the same with setting output to 0. Only if that works, go for the timer.

JW

Tesla DeLorean
Guru

And use a scope for frequencies beyond perception of the human eye

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
JAlca
Associate III

I think User may be right and the frecuency is too high.

Try blinking the led every 500ms.

TIM1->PSC = (SystemCoreClock / 1000) - 1; //Now timer counts miliseconds

TIM1->ARR = 1000; //Count every second

TIM->CCR1 = 500; //Duty is 50%.

prashjain007
Associate

I tried blinking at every 500ms but still not working. Even for high freq, LED should glow without blinking.

waclawek.jan
Super User

Read out and check/post content of relevant GPIO and TIM registers.

JW