XTAL0 as GPIO input PTA19 on KV30 problems...

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

XTAL0 as GPIO input PTA19 on KV30 problems...

365 Views
josephwalsh
Contributor I

Hi all, 

We are using XTAL0 as a gpio input(alt1), configured with an internal pullup (PCR=0x103), and are seeing this input regularly drop about a volt at the clock frequency when driven high.  It's a weird behavior that we can't seem to run down.  Has anyone here happened to of used XTAL0 as an INPUT instead of an output, and if so, have you seen any similar behavior?  We do have an external clock input as well.  I am leaning towards board layout/external hardware issues at this point, but hope to rule out the fact that the pin it XTAL0 as a possible source.  The Port Control Register is not changing and the micro is not resetting.

Thanks for any help.

Labels (1)
Tags (3)
0 Kudos
1 Reply

289 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Joseph,

The fact that you are seeing the xMHz wavefrom on the XTAL pin suggests that you have not disabled the oscillator. This is achieved by clearing the EREFS in the MCG_C2 register. This is actually what selects either the oscillator or the external clock input. You should be able to have EREFS = 0, apply an external clock and also set ERCLKEN if you like. If you need to use the xMHz OSCERCLK with any peripherals then you can. If however you do not need this clock running then clear ERCLKEN to save current.

MCG_C2[EREFS].png

OSC_CR[ERCLKEN].png

Best Regards,

Robin

 

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

0 Kudos