How to output system clock on a GPIO pin

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

How to output system clock on a GPIO pin

1,554 Views
eigen
Contributor I

I have a Kinetis KL03Z board. I try to output the 48MHz system clock on a GPIO pin for some other use, but have a hard time finding related information of doing this. Please advise. Thanks.

Tags (1)
0 Kudos
Reply
1 Reply

1,234 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Eigen,

You can use the CLKOUT pin to output the clock:

pastedImage_0.png

For example ,

- you can configure the bus clock to 48MHZ,

- then configure the PTA4 pin to CLKOUT through the register of  PORTx_PCRn -> MUX ;

- then configure the CLKOUT pin output BUS clock through

the register of "SIM_SOPT2" -> CLKOUTSEL to  " 010 "

pastedImage_1.png

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------