arch/arm/src/tiva/common/lm4xx_tm3c_sysctrl.c
/****************************************************************************
 * Name: tiva_oscdelay
 *
 * Description:
 *   Wait for the newly selected oscillator(s) to settle.  This is tricky
 *   because the time that we wait can be significant and is determined by
 *   the previous clock setting, not the one that we are configuring.
 *
 ****************************************************************************/
tiva_oscdelay
Description:
Wait for the newly selected oscillator(s) to settle.  This is tricky
because the time that we wait can be significant and is determined by
the previous clock setting, not the one that we are configuring.
tiva_oscdelay Description : Wait for the newly selected oscillator ( s ) to settle . This is tricky because the time that we wait can be significant and is determined by the previous clock setting not the one that we are configuring .
static inline void tiva_oscdelay(uint32_t rcc, uint32_t rcc2)
{
  uint32_t delay = FAST_OSCDELAY;
  if ((rcc2 & SYSCON_RCC2_USERCC2) != 0)
    {
      uint32_t rcc2src = rcc2 & SYSCON_RCC2_OSCSRC2_MASK;
      if ((rcc2src == SYSCON_RCC2_OSCSRC2_LFIOSC) ||
          (rcc2src == SYSCON_RCC2_OSCSRC2_32768HZ))
        {
          delay = SLOW_OSCDELAY;
        }
    }
  else
    {
      uint32_t rccsrc  = rcc  & SYSCON_RCC_OSCSRC_MASK;
      if (rccsrc == SYSCON_RCC_OSCSRC_LFIOSC)
        {
          delay = SLOW_OSCDELAY;
        }
    }
  tiva_delay(delay);
}
static inline void tiva_oscdelay ( uint32_t rcc , uint32_t rcc2 ) { uint32_t delay = FAST_OSCDELAY ; if ( ( rcc2 & SYSCON_RCC2_USERCC2 ) != 0 ) { uint32_t rcc2src = rcc2 & SYSCON_RCC2_OSCSRC2_MASK ; if ( ( rcc2src == SYSCON_RCC2_OSCSRC2_LFIOSC ) || ( rcc2src == SYSCON_RCC2_OSCSRC2_32768HZ ) ) { delay = SLOW_OSCDELAY ; } } else { uint32_t rccsrc = rcc & SYSCON_RCC_OSCSRC_MASK ; if ( rccsrc == SYSCON_RCC_OSCSRC_LFIOSC ) { delay = SLOW_OSCDELAY ; } } tiva_delay ( delay ) ; }
Name: tiva_oscdelay
 Description:
   Wait for the newly selected oscillator(s) to settle.
Name : tiva_oscdelay Description : Wait for the newly selected oscillator ( s ) to settle .
/* Wait for the oscillator  to stabilize.  A smaller delay is used if the
   * current clock rate is very slow.
   */ /* Are we currently using RCC2? */ /* No.. using OSCSRC in RCC */ /* Then delay that number of loops */