emlib/src/em_cmu.c
static uint32_t auxClkGet(void)
{
  uint32_t ret;

#if defined(_CMU_AUXHFRCOCTRL_FREQRANGE_MASK)
  ret = auxHfrcoFreq;

#elif defined(_CMU_AUXHFRCOCTRL_BAND_MASK)
  /* All series 0 families except EFM32G */
  switch (CMU->AUXHFRCOCTRL & _CMU_AUXHFRCOCTRL_BAND_MASK) {
    case CMU_AUXHFRCOCTRL_BAND_1MHZ:
      if ( SYSTEM_GetProdRev() >= 19 ) {
        ret = 1200000;
      } else {
        ret = 1000000;
      }
      break;

    case CMU_AUXHFRCOCTRL_BAND_7MHZ:
      if ( SYSTEM_GetProdRev() >= 19 ) {
        ret = 6600000;
      } else {
        ret = 7000000;
      }
      break;

    case CMU_AUXHFRCOCTRL_BAND_11MHZ:
      ret = 11000000;
      break;

    case CMU_AUXHFRCOCTRL_BAND_14MHZ:
      ret = 14000000;
      break;

    case CMU_AUXHFRCOCTRL_BAND_21MHZ:
      ret = 21000000;
      break;

#if defined(_CMU_AUXHFRCOCTRL_BAND_28MHZ)
    case CMU_AUXHFRCOCTRL_BAND_28MHZ:
      ret = 28000000;
      break;
#endif

    default:
      EFM_ASSERT(0);
      ret = 0;
      break;
  }

#else
  /* Gecko has a fixed 14Mhz AUXHFRCO clock */
  ret = 14000000;

#endif

  return ret;
}
/***************************************************************************/
/**
 * @brief
 *   Get the AUX clock frequency. Used by MSC flash programming and LESENSE,
 *   by default also as debug clock.
 *
 * @return
 *   AUX Frequency in Hz
 ******************************************************************************/
@brief
Get the AUX clock frequency. Used by MSC flash programming and LESENSE,
by default also as debug clock.

@return
AUX Frequency in Hz
@brief Get the AUX clock frequency . Used by MSC flash programming and LESENSE by default also as debug clock . @return AUX Frequency in Hz
static uint32_t auxClkGet(void)
{
  uint32_t ret;
#if defined(_CMU_AUXHFRCOCTRL_FREQRANGE_MASK)
  ret = auxHfrcoFreq;
#elif defined(_CMU_AUXHFRCOCTRL_BAND_MASK)
  switch (CMU->AUXHFRCOCTRL & _CMU_AUXHFRCOCTRL_BAND_MASK) {
    case CMU_AUXHFRCOCTRL_BAND_1MHZ:
      if ( SYSTEM_GetProdRev() >= 19 ) {
        ret = 1200000;
      } else {
        ret = 1000000;
      }
      break;
    case CMU_AUXHFRCOCTRL_BAND_7MHZ:
      if ( SYSTEM_GetProdRev() >= 19 ) {
        ret = 6600000;
      } else {
        ret = 7000000;
      }
      break;
    case CMU_AUXHFRCOCTRL_BAND_11MHZ:
      ret = 11000000;
      break;
    case CMU_AUXHFRCOCTRL_BAND_14MHZ:
      ret = 14000000;
      break;
    case CMU_AUXHFRCOCTRL_BAND_21MHZ:
      ret = 21000000;
      break;
#if defined(_CMU_AUXHFRCOCTRL_BAND_28MHZ)
    case CMU_AUXHFRCOCTRL_BAND_28MHZ:
      ret = 28000000;
      break;
#endif
    default:
      EFM_ASSERT(0);
      ret = 0;
      break;
  }
#else
  ret = 14000000;
#endif
  return ret;
}
static uint32_t auxClkGet ( void ) { uint32_t ret ; #if defined ( _CMU_AUXHFRCOCTRL_FREQRANGE_MASK ) ret = auxHfrcoFreq ; #elif defined ( _CMU_AUXHFRCOCTRL_BAND_MASK ) switch ( CMU -> AUXHFRCOCTRL & _CMU_AUXHFRCOCTRL_BAND_MASK ) { case CMU_AUXHFRCOCTRL_BAND_1MHZ : if ( SYSTEM_GetProdRev ( ) >= 19 ) { ret = 1200000 ; } else { ret = 1000000 ; } break ; case CMU_AUXHFRCOCTRL_BAND_7MHZ : if ( SYSTEM_GetProdRev ( ) >= 19 ) { ret = 6600000 ; } else { ret = 7000000 ; } break ; case CMU_AUXHFRCOCTRL_BAND_11MHZ : ret = 11000000 ; break ; case CMU_AUXHFRCOCTRL_BAND_14MHZ : ret = 14000000 ; break ; case CMU_AUXHFRCOCTRL_BAND_21MHZ : ret = 21000000 ; break ; #if defined ( _CMU_AUXHFRCOCTRL_BAND_28MHZ ) case CMU_AUXHFRCOCTRL_BAND_28MHZ : ret = 28000000 ; break ; #endif default : EFM_ASSERT ( 0 ) ; ret = 0 ; break ; } #else ret = 14000000 ; #endif return ret ; }
@brief
   Get the AUX clock frequency.
@brief Get the AUX clock frequency .
/* All series 0 families except EFM32G */ /* Gecko has a fixed 14Mhz AUXHFRCO clock */