Configure PWM channels using SCT in LPC1549

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

Configure PWM channels using SCT in LPC1549

1,242 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ramniraj10 on Sun Aug 10 23:37:54 MST 2014
Is it possible to configure 27 PWM channels using SCT timer in LPC1549?

Can you provide initialization routine or state machine diagram for the same?
Labels (1)
0 Kudos
6 Replies

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ramniraj10 on Wed Aug 20 01:53:35 MST 2014
Dear MC,

Thanks for your suggestion. :)


0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Aug 14 17:21:00 MST 2014
Hi ramniraj1,
In LQFP100 package, all 28 PWMs are available at the pins. Although SCT0 and SCT1 has 10 outputs each, all of them are not coming out to pins.

See below break-up.

SCT0  -> (Out0 to Out7)                   -> 8 Outputs   connected to pins
SCT1 -> (Out0 to Out7)                    -> 8 Outputs   connected to pins
SCT2  -> (Out0 to Out5)                   -> 6 Outputs   connected to pins
SCT3  -> (Out0 to Out5)                   -> 6 Outputs   connected to pins
--------------------------------------------------------------------------------------
Total SCT outputs                          -> 8+8+6+6 =28      connected to pins
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Wed Aug 13 03:52:45 MST 2014

Quote: ramniraj10
But, i doubt if it is possible...



:quest:

So what's not clear there?

Just use LQFP100 and start with sample 'periph_sct_pwm' ...
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ramniraj10 on Tue Aug 12 22:36:10 MST 2014
1. LPC15XX.pdf:

Configurable PWM/timer/motor control subsystem:
 Up to four 32-bit counter/timers or up to eight 16-bit counter/timers or combinations
of 16-bit and 32-bit timers.
 Up to 28 match outputs and 22 configurable capture inputs with input multiplexer.
 Up to 28 PWM outputs total.


2. UM10736.pdf
a) page 222
PWM features:
– Counters can be used in conjunction with match registers to toggle outputs and
create time-proportioned PWM signals.
– Up to 8 single-edge or dual-edge controlled PWM outputs with independent duty
cycles and common PWM cycle length.

b) page 223
10 outputs (some outputs are connected to multiple locations)
– Three outputs connected to external pins through the switch matrix as movable
functions.
– Five outputs connected to external pins through the switch matrix as fixed-pin
functions.
– Two outputs connected to the SCTIPU to use as sample and abort inputs.
– One output connected to the other large SCT
– Four outputs connected to one small SCT
– Two outputs connected to each ADC trigger input

c) page 268
PWM features:
– Counters can be used in conjunction with match registers to toggle outputs and
create time-proportioned PWM signals.
– Up to six single-edge or dual-edge controlled PWM outputs with independent duty
cycles if configured as 32-bit timers.

d) page 269
6 outputs (some outputs are connected to multiple locations)
– Three outputs connected to external pins through the switch matrix as movable
functions.
– Three outputs connected to external pins through the switch matrix as fixed-pin
functions.
– Two outputs connected to the SCT IPU to use as sample and abort inputs.
– Four outputs connected to the accompanying large SCT
– Two outputs connected to each ADC trigger input

From above points, total PWM outputs possible according to LPC15XX.pdf is 28.
and according to UM10736.pdf, total possible = a +b+c+d = 8+8+6+6 = 28.

But, i doubt if it is possible or not because my project and micro controller selection is based on this query.
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Aug 12 14:49:06 MST 2014

Quote: YOZHik
No. SCT0 and SCT1 have 7 outputs available on external pins each..



:quest:

8  at LQFP100 :)
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by YOZHik on Tue Aug 12 13:56:12 MST 2014
No. SCT0 and SCT1 have 7 outputs available on external pins each. SCT2 and SCT3 have 6 outputs available on external pins each. Therefore a theoretical maximum is 7+7+6+6=26 externally available PWM outputs.
0 Kudos