mk20 RTC

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

mk20 RTC

488 Views
sreeramadhanala
Contributor I

sir,

i am using MK20dx128vlh5 freedom board.

In that ,i am trying check RTC_CLKout ,

But it not working and

How to configure the PORTC3 pin as CLKOUT

Labels (1)
0 Kudos
1 Reply

358 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Sreerama,

This is the PTC3 function:

B8 PTC3/
LLWU_P7
CMP1_IN1 CMP1_IN1 PTC3/
LLWU_P7
SPI0_PCS1 UART1_RX FTM0_CH2 CLKOUT I2S0_TX_BCLK

if you want to configure the PTC3 as CLKOUT pin, this is the procedure:

1)Enable portC gated clock

SIM_SCGC5|=0x800; //set the PORTC bit, bit 12

2)set MUX bits in the PORTC_PCR3

PORTC_PCR3&=0x700;

PORTC_PCR3|=5<<8; //ALT5 is CLKOUT

3)set the CLKOUTSEL bits in SIM_SOPT2 to output different clcok

CLKOUT select
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

Hope it can help you

BR

Xiangjun Rong

0 Kudos