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.

TSM320F28379D

Other Parts Discussed in Thread: C2000WARE

Hello,

I am working with the C2000 launchpad (TSM320F28379D Board) on watchdog Module, I want to know the WAYS I can make my watchdog to reset like putting a infinite loop or anything. I want to know more ways a user can make watchdog to cause a reset on this board.

  • Hi Ashish,

    Here's an example you can have a look at:
    C:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2837xd\examples\cpu1\watchdog\cpu01

    This is the only way to perform a Watchdog reset.

    Regards,
    Gautam
  • In my code when i am using DELAY_US()  function and doing run to line to while(1) loop then it is opening GEL expression But if i am not using DELAY_US() function then it working fine I want to why it is happening?

    Here WATCHDOG is configured to cause a cpu reset(working fine).

    #include "F28x_Project.h"
    #include "config.h"
    #define BLINKY_LED1 31

    Uint32 loopcount = 0;
    void main(void)
    {
    InitSysCtrl();
    InitWatchdog();
    GPIO_SetupPinMux(BLINKY_LED1, GPIO_MUX_CPU1, 0);
    GPIO_SetupPinOptions(BLINKY_LED1, GPIO_OUTPUT, GPIO_PUSHPULL);
    GPIO_WritePin(BLINKY_LED1,0);
    DELAY_US(1000*1000);
    GPIO_WritePin(BLINKY_LED1,1);
    DELAY_US(1000*1000);
    while(1)
    {
    loopcount++;
    }
    }

  • There is one Register in F2837xD_usDelay.asm named ACC Register which keeps getting incremented my code is stuck there only I want to know the reason and solution to this problem.

    I am attaching screenshot where my code is stuck (There one commend line is there Loop is ACC>=0)that is where my code is stuck it is looping over here.Please help me resolve it.

    thanks

  • Ashish,

    Not very clear on the issue you are facing. If you are resetting the device by enabling the WD and not servicing WD then you'll see it's getting stuck because device will be in reset look. It'll boot, enable the WD and then go into delay loop, WD will reset the device and then come back to same. Since delay loop is taking most of the execution time, it appears as if code is stuck in this loop. Hope this is clear.

    Regards,
    Vivek Singh
  • This is my watchdog configuration file ,I am using serviceDog() function here after enabling watchdog.

    How much time does cpu reset take?

    After CPU reset the code will run again or wait at the starting line?

    #ifndef CONFIG_H_
    #define CONFIG_H_

    #include "F2837xD_device.h"

    //extern void Device_init(void);


    void InitWatchdog(void)
    {
    /*
    SysCtl_setWatchdogMode(SYSCTL_WD_MODE_RESET);
    SysCtl_setWatchdogWindowValue(0);
    ServiceDog();
    SysCtl_enableWatchdog();
    */
    {
    asm(" EALLOW");
    WdRegs.SCSR.all = 0x0000;
    asm(" EDIS");
    asm(" EALLOW");
    WdRegs.WDCR.all = 0x0028;
    WdRegs.WDWCR.all = 0x0000;
    asm(" EDIS");
    ServiceDog();
    }
    }


    #endif /* CONFIG_H_ */

  • Ashish,

    After WD reset code should run again and boot as per emulation boot setting is JTAG/CCS is connected. If the emulation boot is not set properly then it'll go into Wait BOOT (stuck in loop). Please refer TRM for more detail about emulation BOOT.

    Regards,
    Vivek Singh