2019-11-21 08:08 AM
Dear Community
I am not able to glow Green LED on Nucleo Board. I have generated code through STM32CubeMX. I have attached files. Kindly help.
2019-11-21 10:50 AM
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
2019-11-21 02:48 PM
And use a scope for frequencies beyond perception of the human eye
2019-11-21 05:25 PM
I have developed code for led glowing without timer. It is working absolutely fine. But with pwm, it is not glowing. I am starting pwm in main. Whatever frequency it is, led has to glow for duty of 50%.
2019-11-23 12:20 PM
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%.
2019-11-27 08:25 AM
I tried blinking at every 500ms but still not working. Even for high freq, LED should glow without blinking.
2019-11-27 10:04 AM
Read out and check/post content of relevant GPIO and TIM registers.
JW