Dear NXP,
I am using LPC54114 and I have success to generate a PWM waveform (Period 60Hz with duty cycle 99%) on P0_30 from internal APB clock source.
PWM Pin P0_30, MR[3] & MR[2] is used, Timer Mode, Clock source:48MHz APB Clock
Now I have to change to a external clock source 120Hz (from external board) to replace the original internal clock and generate the same 60Hz, duty cycle 99% PWM waveform. The external 120Hz clock source should be input to a Timer CAP pin .
How can I achieve this goal? Any sample code/ application note for reference?
Thanks
Eric
Hello
Hope you are well. To use an external source you need to select the SCT Input Clock Mode or the Asynchronous mode.
In SCT Input Clock mode the input/edge selected clocks the SCT module, including the counters and prescalers, after first being synchronized to the system clock. The minimum width of the positive and negative phases of the clock input must each be greater than one full period of the bus/system clock.
In asynchronous the entire SCT module is clocked directly by the input/edge selected. In this mode, the SCT outputs are switched synchronously to the SCT input clock - not the system clock. The input clock rate must be at least half the system clock rate and can be the same or faster than the system clock.
I suggest you to use the config tools in MCUXpresso to set this configuration.
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar