KW2x: XTAL (PTA19)

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

KW2x: XTAL (PTA19)

跳至解决方案
562 次查看
ignisuti_
Contributor IV

Hello,
I'm using the KW2x MCU and am curious about using PTA19 as GPIO.

I'm using PTA18 as a modem CLK_OUT (MCU CLK_IN). This signal is running at 4MHz. Then my MCU is put into PEE mode to run at 48MHz.

According to everything I've read in the reference manual, I should be allowed to use PTA19 as a GPIO. However it is toggling states as if it were internally tied to a clocking signal. Does anyone know what steps I need to take to use PTA19 as a GPIO?

Note: I do have it configure as an INPUT with MUX ALT1.

0 项奖励
1 解答
376 次查看
EarlOrlando
Senior Contributor II

Hello Joe,

As you said, this pin can be used as GPIO.

pastedImage_2.png

To achieve this, you need to configure the field MCG_C2[EREFS] as "External reference clock requested" (bit in 0).

Please confirm that this solves your problem.

Best regards,

Earl Ramírez

NXP Technical Support Engineer

在原帖中查看解决方案

0 项奖励
2 回复数
377 次查看
EarlOrlando
Senior Contributor II

Hello Joe,

As you said, this pin can be used as GPIO.

pastedImage_2.png

To achieve this, you need to configure the field MCG_C2[EREFS] as "External reference clock requested" (bit in 0).

Please confirm that this solves your problem.

Best regards,

Earl Ramírez

NXP Technical Support Engineer

0 项奖励
376 次查看
ignisuti_
Contributor IV

Earl,

Thanks for the reply. That worked. Thank you!

For anyone else reading... I did also have to remove the line of code below which was waiting on the EREFS to finish initialization.

    while (!(MCG_S & MCG_S_OSCINIT0_MASK)){}

0 项奖励