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.

TM4C1294NCPDT: Problem with Watchdog Resets

Part Number: TM4C1294NCPDT

The problem is as follows:

  • In our bootloader we have initialized the watchdog to a time of (SysCtlClockGet() * 30 seconds) so that it resets the system when the application FW does not start and run correctly and service the watchdog Interrupt.
  • To test this behavior we loaded the bootloader with watchdog initialized and an application FW which has the Watchdog Servicing Routine disabled to check if the reset triggered by the Watchdog correctly.
  • When we Power On the device (Cold Reset) we see that it resets the system after 60 seconds as expected since the Watchdog Interrupt is not serviced in the application FW.
  • But after the Watchdog resets the system for the first time after power on (Cold Reset) we see that it then continues to reset (Warm Reset, I think) the system every 15 seconds (60seconds/4) and not after 60secs.

 

Observations:

  • Every Cold Reset (external power off and then power on) triggers the Reset as expected after 60 secs but after that the successive resets triggered by the Watchdog are at 15 secs.
  • We found that this was because the SysCtlClockGet()returns 15000000 for Warm Resets and 53693160 for the Cold Resets and hence the reset times of 60secs and 15 secs.
  • Adding a delay before OR after the SysCtlClockFreqSet() does not help as well.
  • Tried to find answers in the TM4C1294NCPDT data sheet and Tivaware ROM Info sheet but could not find any credible source.

 

Could you help us out in understanding why we see this difference in the behavior?

Also is there any operation that we need to do before the SysCtlClockFreqSet() is called again in Warm Reset scenarios so that we get a consistent value with SysCtlClockGet() in both Cold and Warm Resets?

 

  • That's an awfully long watchdog period.

    Olrik Maier said:
    We found that this was because the SysCtlClockGet()returns 15000000 for Warm Resets and 53693160 for the Cold Resets and hence the reset times of 60secs and 15 secs.

    Tivaware User Manual said:

    Note:

    This cannot return accurate results if SysCtlClockSet() has not been called to configure the

    clocking of the device, or if the device is directly clocked from a crystal (or a clock source)

    that is not one of the supported crystal frequencies. In the latter case, this function should be

    modified to directly return the correct system clock rate.

    This function can only be called on TM4C123 devices. For TM4C129 devices, the return value

    from SysCtlClockFreqSet() indicates the system clock frequency.

    Returns:

    The processor clock rate for TM4C123 devices only.

     

    Note highlighted sections.

     

    Robert

  • Hi Olrik,

     You cannot use SysCtlClockGet() for TM4C129 device. The SysCtlClockGet() is only for TM4C123 device. Please see below. You should use the returned value from SysCtlClockFreqSet() instead.

    26.2.2.3 SysCtlClockGet
    Gets the processor clock rate.
    Prototype:
    uint32_t
    SysCtlClockGet(void)
    Description:
    This function determines the clock rate of the processor clock, which is also the clock rate
    of the peripheral modules (with the exception of PWM, which has its own clock divider; other
    peripherals may have different clocking, see the device data sheet for details).
    Note:
    This cannot return accurate results if SysCtlClockSet() has not been called to configure the
    clocking of the device, or if the device is directly clocked from a crystal (or a clock source)
    that is not one of the supported crystal frequencies. In the latter case, this function should be
    modified to directly return the correct system clock rate.
    This function can only be called on TM4C123 devices. For TM4C129 devices, the return value
    from SysCtlClockFreqSet() indicates the system clock frequency.
    Returns:
    The processor clock rate for TM4C123 devices only.