KW2x: XTAL (PTA19)

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

KW2x: XTAL (PTA19)

Jump to solution
549 Views
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 Kudos
1 Solution
363 Views
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

View solution in original post

0 Kudos
2 Replies
364 Views
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 Kudos
363 Views
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 Kudos