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: TM4C1294NCPDT

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hi,

I configured wdt in ti-rtos platform.

My system will work on 120Mhz so based on this wdt will period will set to 120000000 for getting 1sec delay. But it will hit interrupt handler in 2sec.

While set the period to 60000000 it will hit the interrupt handler time of 1sec.

What is the cause of this?..

Regards

Nikhil

  • Hello Nikhil,

    It sounds on the surface like the MCU is running at 60 MHz. Can you try and test this by using another timer and see if you can see the same behavior?

    Also, if you have a simple project, if you can attach it I can try and test it myself and also check the code.
  • Hello Nikhil,

    Actually, easier check for System Clock that slipped my mind briefly, just use SysCtlClockGet to see if you are getting the right system clock set.
  • Hi ,

    Use these method and i got a result like these,

    uint32_t clock = SysCtlClockGet();
    System_printf("\r\n Clock Fqncy : %d \r\n",clock);
    System_flush();


    Output :
    [CORTEX_M4_0]
    Clock Fqncy : 9600000

    But while i check the configuration file clock frequency shown to be

    watchdog.cfg -> BIOS -> Properties ->spuFreq : 120000000

    Like this...

    Regards
    Nikhil
  •  Hi,

    Please check the code for the reference.

    watchdog_EK_TM4C1294XL_TI.zip

  • Nikhil KV1 said:
    Use these method and i got a result like these,

    uint32_t clock = SysCtlClockGet();
    System_printf("\r\n Clock Fqncy : %d \r\n",clock);
    System_flush();


    Output :
    [CORTEX_M4_0]
    Clock Fqncy : 9600000

    The description of the SysCtrlClockGet includes:

    //! \note This function can only be called on TM4C123 devices.  For TM4C129
    //! devices, the return value from SysCtlClockFreqSet() indicates the system
    //! clock frequency.

    Since the project is for a a TM4C129 device it is not valid to call SysCtrlClockGet, since that returns an incorrect value.

  • Hi Chester,

    Thanks!! I must've had thread part numbers confused on my end. You are 100% right.

    Typically for TM4C129 the output of SysCtlClockFreqSet would be used to verify the clock frequency, but I am not sure how that works in TI-RTOS to check the clock is running at the right frequency, though I imagine that is when set via the BIOS. So let's assume the clock is configured right.

    Let me see about getting a TI-RTOS expert to have a look.
  • Ralph Jacobi said:
    Typically for TM4C129 the output of SysCtlClockFreqSet would be used to verify the clock frequency, but I am not sure how that works in TI-RTOS to check the clock is running at the right frequency, though I imagine that is when set via the BIOS.

    In the watchdog_EK_TM4C1294XL_TI.zip project which was attached by Nikhil the "Boot - Clocking Options" has the CPU clock frequency configured at 120 MHz:

    In the Debug/configPkg/package/cfg/watchdog_pem4f.c file which is generated by SYS/BIOS contains the following which sets the CPU clock frequency to 120 MHz during startup:

    /*
     *  ======== ti_catalog_arm_cortexm4_tiva_ce_Boot_init ========
     */
    xdc_Void ti_catalog_arm_cortexm4_tiva_ce_Boot_init()
    {
        ti_catalog_arm_cortexm4_tiva_ce_Boot_sysCtlClockFreqSet((xdc_ULong)
            (-251656576), (xdc_ULong)(120000000));
    }
    

    I stepped in the debugger and the ti_catalog_arm_cortexm4_tiva_ce_Boot_sysCtlClockFreqSet call did return 120000000 (albeit the value is not saved in any variable).

  • Can I mark this as resolved?

    Todd