AnsweredAssumed Answered

Reset when trying to start RTC oscillator

Question asked by Dan Rhodes on Jun 5, 2015
Latest reply on Jun 5, 2015 by Jorge_Gonzalez

Hi

 

I'm using a K12 micro and want to use an external crystal on EXTAL32/XTAL32 as the source for the FLL and RTC.  When I try to start the RTC oscillator using the following code I get a reboot at line 3.

 

1. SIM_SCGC6 = SIM_SCGC6_RTC_MASK;

2. RTC_CR  = RTC_CR_SWR_MASK + RTC_CR_SC4P_MASK + RTC_CR_SC8P_MASK + RTC_CR_CLKO_MASK;

3. RTC_CR  &= ~RTC_CR_SWR_MASK;

4.  RTC_CR |= RTC_CR_OSCE_MASK;

 

I read on this forum that VBAT left floating can cause this.  This is how my design is implemented.  Could there be another issue causing the reset?  If this is the cause, is there a workaround?

 

Thanks,

 

Dan

Outcomes