AnsweredAssumed Answered

Is 48MHz PWM possible using SCT on LPC4357@204MHz?

Question asked by quex on Jun 13, 2018
Latest reply on Jun 14, 2018 by Kerry Zhou

I'm currently struggling with the SCT, which I need to use for PWM generation.

I tried the LPCopen function:

Chip_SCTPWM_SetRate(LPC_SCT_T *pSCT, uint32_t freq);

 

It calculates a rate and writes it to the match reload register 0:

rate = Chip_Clock_GetRate(CLK_MX_SCT) / freq;

Chip_SCT_SetMatchReload(pSCT, SCT_MATCH_0, rate);

 

The chip clock is 204MHz and the requested PWM frequency (freq) is 48MHz.

204 / 48 = 4.25

The decimals are of course lost and I end up with a frequency of 40.8MHz (204 / (4+1))

The next step I can reach using this function is 51MHz.

 

Is there a way to get 48MHz output frequency using directly the SCT registers, without LPCopen?

Thanks for any hint.

 

Edit:

The frequencies are not multiples, the clock can only be divided, there is only one internal clock source for SCT.
It's not possible to generate PWM @ 48 MHz.

Outcomes