This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TM4C1294NCPDT: Tiva C Oscillator startup time

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hi,

Does TIRTOS for TIva C sample codes consider startup time of crystal oscillator?

Currently we are using Ethernet sample code from tirtos_tivac_2_16_01_14,
but cannot find where exactly the crystal settings are done and  does it include proper delay for startup time of crystal?

All the sample codes has below INIT functions but there is no clock settings.

Board_initGeneral();
Board_initGPIO();
Board_initEMAC();

Best Regards
paddu

  • Hi,

     You can see the clock configuration in the boot module. Please see below. I think the Ti-RTOS will infer the normal TivaWare clock configuration code during boot up.

  • Hi Charles,

    Thank you for the quick reply.

    But I couldn't find the Wait Time allocated for Oscillator to Stabilize in the cfg script or the RTOS related source.
    Should we not think about the Clock Stabilize time? As per the datasheet crystal needs at least 8ms to settle.
    I couldn't understand how it is handled in the RTOS.

    Best Regards
    paddu
  • Hi Paddu,
    As I mentioned the TI-RTOS reuses a lot of TivaWare bootup code. With that in mind the oscillator startup time will be taken care of. For example, if you go to the TivaWare API source for SysCtlClockFreqSet() you will find the below snippet to wait out the oscillator startup time.

    //
    // Timeout using the legacy delay value.
    //
    ui32Delay = 524288;

    while((HWREG(SYSCTL_RIS) & SYSCTL_RIS_MOSCPUPRIS) == 0)
    {
    ui32Delay--;

    if(ui32Delay == 0)
    {
    break;
    }
    }
    //
    // If the main oscillator failed to start up then do not switch to
    // it and return.
    //
    if(ui32Delay == 0)
    {
    return(0);
    }