emlib/src/em_cmu.c
void CMU_UpdateWaitStates(uint32_t freq, int vscale)
{
  flashWaitStateControl(freq, vscale);
#if defined(_MSC_RAMCTRL_RAMWSEN_MASK)
  setRamWaitState(freq, vscale);
#endif
#if defined(_MSC_CTRL_WAITMODE_MASK)
  setBusWaitState(freq, vscale);
#endif
}
/***************************************************************************/
/**
 * @brief
 *   Configure various wait states necessary to switch to a certain frequency
 *   and a certain voltage scale.
 *
 * @details
 *   This function will setup the necessary flash, bus and RAM wait states.
 *   Updating the wait state configuration must be done before
 *   increasing the clock frequency, and it must be done after decreasing the
 *   clock frequency. Updating the wait state configuration must be done before
 *   core voltage is decreased, and it must be done after a core voltage is
 *   increased.
 *
 * @param[in] coreFreq
 *   Core clock frequency to configure wait-states for.
 *
 * @param[in] vscale
 *   The voltage scale to configure wait-states for. Expected values are
 *   0 or 2, higher number is lower voltage.
 *
 *   @li 0 = 1.2 V (VSCALE2)
 *   @li 2 = 1.0 V (VSCALE0)
 *
 ******************************************************************************/
@brief
Configure various wait states necessary to switch to a certain frequency
and a certain voltage scale.

@details
This function will setup the necessary flash, bus and RAM wait states.
Updating the wait state configuration must be done before
increasing the clock frequency, and it must be done after decreasing the
clock frequency. Updating the wait state configuration must be done before
core voltage is decreased, and it must be done after a core voltage is
increased.

@param[in] coreFreq
Core clock frequency to configure wait-states for.

@param[in] vscale
The voltage scale to configure wait-states for. Expected values are
0 or 2, higher number is lower voltage.


@brief Configure various wait states necessary to switch to a certain frequency and a certain voltage scale . @details This function will setup the necessary flash bus and RAM wait states . Updating the wait state configuration must be done before increasing the clock frequency and it must be done after decreasing the clock frequency . Updating the wait state configuration must be done before core voltage is decreased and it must be done after a core voltage is increased . @param [ in ] coreFreq Core clock frequency to configure wait - states for . @param [ in ] vscale The voltage scale to configure wait - states for . Expected values are 0 or 2 higher number is lower voltage .
void CMU_UpdateWaitStates(uint32_t freq, int vscale)
{
  flashWaitStateControl(freq, vscale);
#if defined(_MSC_RAMCTRL_RAMWSEN_MASK)
  setRamWaitState(freq, vscale);
#endif
#if defined(_MSC_CTRL_WAITMODE_MASK)
  setBusWaitState(freq, vscale);
#endif
}
void CMU_UpdateWaitStates ( uint32_t freq , int vscale ) { flashWaitStateControl ( freq , vscale ) ; #if defined ( _MSC_RAMCTRL_RAMWSEN_MASK ) setRamWaitState ( freq , vscale ) ; #endif #if defined ( _MSC_CTRL_WAITMODE_MASK ) setBusWaitState ( freq , vscale ) ; #endif }
@brief
   Configure various wait states necessary to switch to a certain frequency
   and a certain voltage scale.
@brief Configure various wait states necessary to switch to a certain frequency and a certain voltage scale .