cancel
Showing results for 
Search instead for 
Did you mean: 

Adding PWM function in existing Ping Pong example

cpc
Associate II

Hi,

I have generated the code for PWM generation using STM32 CubeMX and it is working fine on B-l072Z-lrwan1.

But when I was trying to integrate same code with the existing Ping Pong example, I was not getting any PWM signal on respective pin. I have also configure the pin according to timer and channel with the help of datasheet and also check the alternate function for the pin.

I have tried different Timers but I am not getting any PWM signal at output.

Can anyone tell me, why this is happening?

13 REPLIES 13

Okay, so read out and check/post also this register:0690X00000ARDbkQAH.jpg

JW

Thanks for your help.

Thanks for your help.

cpc
Associate II

Now I am getting the PWM. But the problem is SPI clock is affecting the PWM.

PWM is resetting according to SPI and when I disabled the SPI I am getting exact PWM as required.

According to me SPI clock is triggering the PWM.

What can be done to avoid this ?