PN7642 GPIO used for PWM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7642 GPIO used for PWM

1,464 Views
feisalh
Contributor I

Are there any examples of using the GPIO PWM functionality.  In SDK 2.15.000 there is a sctimer support for PWM. However I need two PWM outputs at difference frequencies 2500Hz and 100KHz both at 50% . The sctimer example assumes both PWMs at the same frequency.

I was hoping to use the GPIO PWM function for one of the PWMs that I need.

 

As per the note in "fsl_sctimer.c"

" note When setting PWM output from multiple output pins, they all should use the same PWM mode  i.e all PWM's should be either edge-aligned or center-aligned.  When using this API, the PWM signal frequency of all the initialized channels must be the same.  Otherwise all the initialized channels' PWM signal frequency is equal to the last call to the  API's pwmFreq_Hz.

0 Kudos
Reply
3 Replies

1,415 Views
feisalh
Contributor I

Please re-read my question.  I indicated in the first sentence that I already reviewed the sctimer examples.

My question is specifically about having to run two PWM at two different frequencies. I included the note from the  "fsl_sctimer.c" in my question.

This note implies that the API is limited to one frequency for all three PWM modules.  Is that correct?

"When using this API, the PWM signal frequency of all the initialized channels must be the same. "  

Are there any other resources of support examples for the PN7642 other than the SDK ?

 

 

 

0 Kudos
Reply

1,366 Views
danielchen
NXP TechSupport
NXP TechSupport

sorry we don't have other examples for PWM.

0 Kudos
Reply

1,419 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

There are 3 demos for sctimer.   it is under driver_examples/

danielchen_0-1727336772950.png

 

Regards

Daniel

 

0 Kudos
Reply