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?
Solved! Go to Solution.
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
2. SCTimer
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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!
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
2. SCTimer
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------