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.

Compiler/EK-TM4C1294XL: System clock migration help from LM3S9B92 to EK-TM4C1294XL

Part Number: EK-TM4C1294XL

Tool/software: TI C/C++ Compiler

Dear Engnineers,

I'm currently working on migrating existing application from LM3S9B92 to EK-TM4C129XL for prototyping the application. 

1) SysCtlClockSet()  and 2) SysCtlClockGet()  fucntions are replaced by SysCtlClockFreqSet() in EK-TM4C129XL. However, the return value from the SysCtlClockFreqSet() get stored in g_ui32SysClock. How to make variable shared by multiple source files particularly if I don't have SysCtlClockGet()  fucntion . Looking forward to hearing from you all. Please find the snippet for the error. 

Thanks,

Sai

  • There are two simple options. The first is to declare the variable g_ui32SysClock as extern in each file where it is referenced. This is often done in a header (.h) file. 

    extern uint32_t g_ui32SysClock;

    The other method is to create a function in the file where you defined g_ui32SysClock, that simply returns that value.

    uint32_t mySysCtlClockFreqGet(void)
    {
        return g_ui32SysClock;
    }