LPC4350 - PWM using SGPIO

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

LPC4350 - PWM using SGPIO

589 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Antony on Tue Oct 09 09:43:59 MST 2012
Hi All,
In my application I'd like to use SGPIO to generate PWM signal.
In the UM10503 SGPIO Examples section PWM is mentioned as an (?available) example but not listed.
I have no experience on SGPIO usage.
Could you please advise some reference points to start from.
Any other feedback abot PWM building using SGPIO would be also appreciated :)
Thanks in advance.
标签 (1)
0 项奖励
回复
3 回复数

478 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jgorsk on Fri Oct 12 09:05:36 MST 2012
Hello Antony,

If you want to operate SGPIO PWM at high speed don't use SGPIO interrupt. That takes
to much CPU time. In my opinion you should implement DMA transfers instead. I tried using interrupts,
it doesn't make much sense. The CPU is just too busy with SGPIO ISR.
Apart from that SGPIO based PWM should work fine.

Is it going to be single or multichannel PWM?

If you don't need great accuracy, you can also use any timer to generate the timing and toggle
the PWM pin in that timer interrupt handler but I guess you considered that already.
0 项奖励
回复

478 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Antony on Fri Oct 12 02:03:40 MST 2012
Hello bavarian,
Thanks a lot for your answer.
I my application I already use SCT for other purposes. So there is no possibility to use it for PWM purposes.
The options that I have is to use Timer2 or SGPIO to build PWM.
After checking Timer2 functionality looks like there is no way to build PWM only PFM (External Match registers triggers only dedicated pin). Am I right, by the way? Maybe I have missed something?
Also I cannot use interrupts for that purpose.
So I was thinking about SGPIO usage.
Could you please give me advise about SGPIO.
Is it possible to use it as PWM, any restrictions pitfalls that might occur?
Thanks in advance.

0 项奖励
回复

478 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Thu Oct 11 00:18:19 MST 2012
Hello Antony,

I would recommend to use another feature of the LPC4300, the State Configurable Timer (SCT).
There is a good example in the current software package.
Download it from sw.lpcware.com in the LPC43xx section (download a snapshot of the latest version from 4 Sept 2012)

Look in .\lpc43xx\Examples\SCT\Sct_pwm

For SGPIO there is currently no structured example which does PWM.


Best regards,
NXP Technical Support Team.
0 项奖励
回复