FRDM-K64F clock tracing

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FRDM-K64F clock tracing

ソリューションへジャンプ
1,510件の閲覧回数
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 解決策
1,224件の閲覧回数
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 返答(返信)
1,224件の閲覧回数
shauldorf
Contributor V

Hello Rong

Thanks :smileyhappy: !!!

0 件の賞賛
返信
1,225件の閲覧回数
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 件の賞賛
返信