cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in constantly frequency changing

Harsh_18
Associate II

Hii, i am using NUCLEO-G474RE board and i want to generate pwm signal in which frequency change frequently .But i dont know why this code is not working.

Capture.PNG

2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Issamos
Lead II

Hello @Harsh_18 

First, you need to declare the PWM_start() function before the while(1) (in the main function). 

Also, what is the original value of your arr variable.

Best regards.

II

View solution in original post

3 REPLIES 3
Issamos
Lead II

Hello @Harsh_18 

First, you need to declare the PWM_start() function before the while(1) (in the main function). 

Also, what is the original value of your arr variable.

Best regards.

II

Harsh_18
Associate II

I have already declare PWM_Start() globally. And the original value of arr is 200 that i mention globally.

Hello @Harsh_18 

I think this video may help you.

Best regards.

II