/* Set the PWM frequency of the PWM module. 
The  */
unsigned long PWMFrequencyConfig(unsigned long ulBase, unsigned long ulConfig)
/* Set the PWM frequency of the PWM module. 
The  */
unsigned long PWMFrequencyConfig(unsigned long ulBase, unsigned long ulConfig)
{
    unsigned long ulPreScale;
    unsigned short usCNRData;
    xASSERT((ulBase == PWMA_BASE) || (ulBase == PWMB_BASE));
    ulPreScale = ulConfig & 0xFFFF;
    usCNRData = ((ulConfig & 0xFFFF0000) >> 16);
    xHWREG(ulBase + TIMER_CRR) = usCNRData;
    xHWREG(ulBase + TIMER_PSCR) = ulPreScale - 1;
    return(xSysCtlClockGet() / usCNRData / ulPreScale);    
}