PN7642 GPIO used for PWM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PN7642 GPIO used for PWM

1,471 次查看
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 项奖励
回复
3 回复数

1,422 次查看
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 项奖励
回复

1,373 次查看
danielchen
NXP TechSupport
NXP TechSupport

sorry we don't have other examples for PWM.

0 项奖励
回复

1,426 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

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

danielchen_0-1727336772950.pngdanielchen_0-1727336772950.png

 

Regards

Daniel

 

0 项奖励
回复