A bug? PE don't set SOPT2[UART0SRC]?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A bug? PE don't set SOPT2[UART0SRC]?

Jump to solution
845 Views
markosiponen
Contributor III

I try to generate code for a MKL25Z128VLK4 with processor expert. I have added the Serial_LDD. But I can't find where it sets the SIM_SOPT2[UART0SRC]. SIM_SOPT2[PLLFLLSEL] is set.

Is there a bug in PE?

  /* SIM_SOPT2: PLLFLLSEL=1 */

  SIM_SOPT2 |= SIM_SOPT2_PLLFLLSEL_MASK; /* Select PLL as a clock source for various peripherals */

  /* SIM_SOPT1: OSC32KSEL=3 */

  SIM_SOPT1 |= SIM_SOPT1_OSC32KSEL(0x03); /* LPO 1kHz oscillator drives 32 kHz clock for various peripherals */

  /* SIM_SOPT2: TPMsrc=1 */

  SIM_SOPT2 = (uint32_t)((SIM_SOPT2 & (uint32_t)~(uint32_t)(

               SIM_SOPT2_TPMSRC(0x02)

              )) | (uint32_t)(

               SIM_SOPT2_TPMSRC(0x01)

              ));                      /* Set the TPM clock */

0 Kudos
Reply
1 Solution
753 Views
markosiponen
Contributor III

Found it :-)

UART0_PDD_SetClockSource(UART0_BASE_PTR, UART0_PDD_PLL_FLL_CLOCK);

So no bug.

View solution in original post

0 Kudos
Reply
1 Reply
754 Views
markosiponen
Contributor III

Found it :-)

UART0_PDD_SetClockSource(UART0_BASE_PTR, UART0_PDD_PLL_FLL_CLOCK);

So no bug.

0 Kudos
Reply