FRDM-K64F clock tracing

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

FRDM-K64F clock tracing

Jump to solution
874 Views
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?

Labels (1)
0 Kudos
1 Solution
588 Views
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

View solution in original post

0 Kudos
2 Replies
588 Views
shauldorf
Contributor V

Hello Rong

Thanks :smileyhappy: !!!

0 Kudos
589 Views
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 Kudos