KL82Z: Fix clock selection for PWMOUT driver

This was verified using the ci-test shield

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
pull/6785/head
Mahesh Mahadevan 2018-05-01 12:22:04 -05:00
parent d08c819830
commit 0fb2f01ce7
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ void pwmout_init(pwmout_t* obj, PinName pin)
uint32_t pwm_base_clock;
/* Set the TPM clock source to be IRC 48M */
/* Set the TPM clock source to be MCG FLL clock */
CLOCK_SetTpmClock(1U);
pwm_base_clock = CLOCK_GetFreq(kCLOCK_McgIrc48MClk);
pwm_base_clock = CLOCK_GetFreq(kCLOCK_PllFllSelClk);
float clkval = (float)pwm_base_clock / 1000000.0f;
uint32_t clkdiv = 0;
while (clkval > 1) {