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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
863 次查看
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 项奖励
回复
1 解答
771 次查看
markosiponen
Contributor III

Found it :-)

UART0_PDD_SetClockSource(UART0_BASE_PTR, UART0_PDD_PLL_FLL_CLOCK);

So no bug.

在原帖中查看解决方案

0 项奖励
回复
1 回复
772 次查看
markosiponen
Contributor III

Found it :-)

UART0_PDD_SetClockSource(UART0_BASE_PTR, UART0_PDD_PLL_FLL_CLOCK);

So no bug.

0 项奖励
回复