Ejemplo n.º 1
0
/************************************************************************
 * @brief  Set function for the PMM core voltage (PMMCOREV) setting
 * 
 * @param  level Target VCore setting 
 * 
 * @return none
 *************************************************************************/
void halBoardSetVCore(unsigned char level)
{
  unsigned int currentVCore;

  currentVCore = PMMCTL0 & PMMCOREV_3;      // Get actual VCore  
  // Change VCore step by step 
  while (level != currentVCore) 
  {   
    if (level > currentVCore) 
      halBoardSetVCoreUp(++currentVCore);
    else
      halBoardSetVCoreDown(--currentVCore);
  }
}
Ejemplo n.º 2
0
/**********************************************************************//**
 * @brief  Set function for the PMM core voltage (PMMCOREV) setting
 * 
 * @param  level Target VCore setting 
 * 
 * @return none
 *************************************************************************/
void halBoardSetVCore(unsigned char level)
{
  unsigned char actLevel;

/* F5438 VCore level is set to level 2 and should never change. 
 * F5438A begins at default level zero and should change according to frequency 
 */ 
  if(Get_Device_Type() == F5438A)  
  {
    do {
      actLevel = PMMCTL0_L & PMMCOREV_3;
      if (actLevel < level) 
        halBoardSetVCoreUp(++actLevel);               // Set VCore (step by step)
      if (actLevel > level) 
        halBoardSetVCoreDown(--actLevel);             // Set VCore (step by step)
    }while (actLevel != level);  
  }
}