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/TMS320F28075: Trouble resetting Device

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

I've used this code previously and in other projects that runs with the same processor, where it resets the processor as expected:

//Forces a reset:
EALLOW;
WdRegs.WDCR.all = 0x78;  //Sets WDCHK != 1,0,1
EDIS;

But for some reason in my current application, it just skips over and doesn't reset.  Is there something else that might be causing the processor to ignore this.

  • Kyle,

    If the WD module were disabled this would happen. Could you just check the watchdog is enabled before the write in your post takes place? You'll need to have the WDDIS bit in the WDCR register at 0 by writing 0xA8 to it (I think). I ran this with F28379S earlier this afternoon and it seemed to work fine.

    Regards,

    Richard
  • The watchdog is set to on.  It gets set to 0x2F. 

    But it doesn't seem to work.  Tested by setting a while loop after the watchdog is enabled and it doesn't seem to ever trip.  

    It does works on other versions of code that run on the exact same platform.  Just not this code set.  

  • Kyle,

    I can't see what is going on at the moment. Would you mind trying the watchdog example in the device support part of C2000Ware and modify that to try to reproduce the issue? I have done so on F28379D but I can't get it to misbehave. If you have C2000Ware in the default location, the F28075 watchdog example will be at:
    C:\ti\c2000\C2000Ware_1_00_02_00\device_support\f2807x\examples\cpu1\watchdog

    You'll need to set it up to perform a reset rather than interrupt, and then enable the module before writing your deliberately invalid data:

    // WdRegs.SCSR.all = C28X_BIT1;
    WdRegs.SCSR.all = 0;
    WdRegs.WDCR.all = 0x2F;

    ...

    WdRegs.WDCR.all = 0x78;

    If you find a scenario which fails to reset I can look into it further. Failing this would you be willing to post the relevant part of your code which I can paste into an existing project?

    Regards,

    Richard
  • Richard,
    Sorry for the late response, I got pulled to another project.

    It was that the watchdog was getting disabled by a function that should have been off.

    The watchdog must be enabled before the rest will work. That's not clear in the datasheet, but it works now.

    Thanks for the help.
  • Kyle,

    You are welcome.  Glad to know you found the cause and thanks for letting us know.

    Regards,

    Richard