Drive WS2811 RGB LED with S32K116

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

Drive WS2811 RGB LED with S32K116

1,036 次查看
Saar
Contributor I

Hello Team I have a query regarding controlling the PWM count while generating PWM signal of 800 KHz to drive WS2811 with S32K116 controller. I want to send the exact number of pulses say 24,  but the pulse generated are more than 24.

I am getting the waveform of 800 KHz but since there is no Repetition counter (as there in STM32 controller), I am not able to control the pulse count which I want to send.

Also while trying with the One Shot Timers to generate the pulse I was not able to generate a pulse below 10 us.

Is there any limitation from the hardware side for generating a waveform above 100 KHz?

Can there a way or an alternative to do the same with S32K116 controller to drive WS2811?

0 项奖励
回复
1 回复

981 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Saar,

The pulses can be counted in the FTM overflow interrupt, and the PWM output masked when the SW counter reaches a certain value.

Or a FTM trigger (for example, init_trig) can be rounted via TRGMUX to LPTMR that has Pulse Counter mode and can count the FTM triggers, generate an interrupt or a trigger on match to mask the PWM.

 

Regarding a single pulse, this was discussed here:

https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844006

 

Max. PWM period depends on the FTM clock source.

For example, SOSCDIV1_CLK = 10MHz,

Max. EPWM period = (MOD − CNTIN + 0x0001) / 10MHz = 65536 / 10 MHz = 6.5536ms

danielmartynek_0-1702907206270.png

 

Regards,

Daniel

0 项奖励
回复