what's the difference between sctimer and ctimer?

cancel
Showing results for 
Search instead for 
Did you mean: 

what's the difference between sctimer and ctimer?

Jump to solution
683 Views
Contributor III

I  am looking at the pwm examples provided by a lpc54xxx board. I noticed both  ctimer  and sctimer have been used.

Can someone explain what's the difference?

1 Solution
63 Views
NXP TechSupport
NXP TechSupport

Hi Jenny,

   Yes, Ctimer also support the PWM operation, but the Ctimer don't have the event and state control feature, SCTimer can support two 16bit counters or one 32bit counter, but Ctimer just support 32bit counter/timer,  SCTimer support inputs and outputs is more than Ctimer. SCTimer can support dual-edge PWM outputs, but Ctimer can't realize it.

   We can compare the Ctimer feature with the SCTimer:

1. Ctimer

pastedImage_1.png

2. SCTimer

pastedImage_2.png

             pastedImage_3.png

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
63 Views
NXP TechSupport
NXP TechSupport

Hi Jenny Rendall,

    Please check the LPC54XXX user manual, just from the module features, you can find the SCT have more functions than CTIMER, Ctimer is just a couter/timers, but the SCT can be used as timer, PWM module, and it has the states event control.

  More details, you can check the module feature, that is very clear.

  After you check the user manual, if you still have questions about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

63 Views
Contributor III

I saw both ctimer and sctimer were used for PWM in the imported SDK examples and wasn't sure which to choose, and was wondering if someone could share some insights. Thanks for the reply!

Screen Shot 2018-10-16 at 9.46.23 AM.png

0 Kudos
64 Views
NXP TechSupport
NXP TechSupport

Hi Jenny,

   Yes, Ctimer also support the PWM operation, but the Ctimer don't have the event and state control feature, SCTimer can support two 16bit counters or one 32bit counter, but Ctimer just support 32bit counter/timer,  SCTimer support inputs and outputs is more than Ctimer. SCTimer can support dual-edge PWM outputs, but Ctimer can't realize it.

   We can compare the Ctimer feature with the SCTimer:

1. Ctimer

pastedImage_1.png

2. SCTimer

pastedImage_2.png

             pastedImage_3.png

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post