FRDM-K64F clock tracing

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

FRDM-K64F clock tracing

跳至解决方案
906 次查看
shauldorf
Contributor V

1.  Is it possible to test and trace K64 clocks using oscilloscope connected to test point?

2.  What are the default clocks values for bare-metal MCU after the power up?

标签 (1)
0 项奖励
1 解答
620 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Of course, you can route the FlexBus clock to a pin so that you can test it with scope.You can deduce the core/cyctem clock from FlexBus clock frequency by checking the SIM_CLKDIV1 reg.

The FRDM-K64F uses MK64FN1M0VLL12 chip with 100 pin LQFP, the PTC3 is the CLKOUT pin.

This is the PTC3 function:PTC3/LLWU_P7/CMP1_IN1/SPI0_PCS1/UART1_RX/FTM0_CH2/CLKOUT/I2S0_TX_BCLK, the PTC3 is connected to pin16 of J1 connector on FRDM-K64F

I suppose you can use the code to configure the PTC3 as CLKOUT function:

SIM_SCGC5|=0x800; //enable GORTC gated clock

PORTC_PCR3&=~(0x700);

PORTC_PCR3|=0x500; //select ALT5

You can write the CLKOUTSEL bits to select the CLKOUT in SIM_SOPT2

SIM_SOPT2&=0xE0; //select FlexBus clock

Hope it can help you

BR

XiangJun Rong

CLKOUT select in section 12.2.3 System Options Register 2 (SIM_SOPT2) in RM of K64.


Selects the clock to output on the CLKOUT pin.
000 FlexBus CLKOUT
001 Reserved
010 Flash clock
011 LPO clock (1 kHz)
100 MCGIRCLK
101 RTC 32.768kHz clock
110 OSCERCLK0
111 IRC 48 MHz clock

在原帖中查看解决方案

0 项奖励
2 回复数
620 次查看
shauldorf
Contributor V

Hello Rong

Thanks :smileyhappy: !!!

0 项奖励
621 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Of course, you can route the FlexBus clock to a pin so that you can test it with scope.You can deduce the core/cyctem clock from FlexBus clock frequency by checking the SIM_CLKDIV1 reg.

The FRDM-K64F uses MK64FN1M0VLL12 chip with 100 pin LQFP, the PTC3 is the CLKOUT pin.

This is the PTC3 function:PTC3/LLWU_P7/CMP1_IN1/SPI0_PCS1/UART1_RX/FTM0_CH2/CLKOUT/I2S0_TX_BCLK, the PTC3 is connected to pin16 of J1 connector on FRDM-K64F

I suppose you can use the code to configure the PTC3 as CLKOUT function:

SIM_SCGC5|=0x800; //enable GORTC gated clock

PORTC_PCR3&=~(0x700);

PORTC_PCR3|=0x500; //select ALT5

You can write the CLKOUTSEL bits to select the CLKOUT in SIM_SOPT2

SIM_SOPT2&=0xE0; //select FlexBus clock

Hope it can help you

BR

XiangJun Rong

CLKOUT select in section 12.2.3 System Options Register 2 (SIM_SOPT2) in RM of K64.


Selects the clock to output on the CLKOUT pin.
000 FlexBus CLKOUT
001 Reserved
010 Flash clock
011 LPO clock (1 kHz)
100 MCGIRCLK
101 RTC 32.768kHz clock
110 OSCERCLK0
111 IRC 48 MHz clock

0 项奖励