How to output system clock on a GPIO pin

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

How to output system clock on a GPIO pin

2,107 次查看
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.

标记 (1)
0 项奖励
回复
1 回复

1,787 次查看
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!
-----------------------------------------------------------------------------------------------------------------------