cancel
Showing results for 
Search instead for 
Did you mean: 

Issue when generating PWM on STM32F769

vamshi_kumar
Associate II

Hello Team,

 I am using stm32f769 controller. I am using timer 1 channel 4 for pwm output, and my APB1 clock is 180MHZ here I am taking prescaler : 17999 and ARR=1999 and ccr=1000 for this values I can see output of pwm by generating 5hz pulses. But when I want to generate 486 pulses where my psc:17999 , ARR=19, ccr=10, I cant see any output pulses, my pwm is not responding. 

(ARR+1)(psc+1)=180MHZ/frequency

(ARR+1)(psc+1)=180MHZ/486

(ARR+1)(psc+1)= 370370

ARR+1=370370/18000

ARR+1=20

ARR=19

 

for some values upto ARR= 40 i am getting output over pwm but from values ARR=20 i am not getting output

could you please help me

 

Thanks

vamshi kumar

2 REPLIES 2
TDK
Super User

There's nothing wrong with what you've presented.

There is likely a bug in your code or a misinterpretation of how you are interpreting results.

Ensure the pin speed is set to VERY_HIGH.

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

Hello @vamshi_kumar 
just to be sure, do you mean 486pulses/second right?
And based on F769 datasheet

TIM1 is linked to APB2 not APB1, so can you precise your APB2 timer clocks frequency?
and are you sure that your frequency is 180MHZ
because APB1 max frequency is set to 54MHZ and APB2 is 108MHZ

Gyessine_0-1770047884665.png

BR
Gyessine

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.