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.

TMS320F28035: CPU Soft-restart

Part Number: TMS320F28035
Other Parts Discussed in Thread: TMDSCNCD28035, TMDSDOCK28035

Hello TI Team.

I have a question about soft restart the CPU from the code. What is the prefered way to restart the CPU from the code?

  • The easiest way to do this to write a “bad” key value to the WDCR register, which would immediately reset the part. Please see page 89 of www.ti.com/lit/SPRUI10

  • Hi . Thank you for information. So to have this working perfectly in my project, first I need to disable Watchdog, next init peripherals, next enable watchdog and then I can use for example:

        EALLOW;
        SysCtrlRegs.WDCR= 0x0068;
        EDIS;

    Am I right?

  • There is no need to disable the WD and enable it later. You can choose not to disable the WD but service it periodically to prevent it from resetting the device. There are two ways you can do a soft restart:

    1. Don’t service the WD. That is, allow the WD counter to overflow, which would reset the device.
    2. Write a "bad" value to WDCR.WDCHK field, which would reset the device immediately. A value of 0x68 would only disable the WD. You could write 0x00 to reset the device.
  • Hi . OK, I took an Example_2803xSci_Echoback example and put code:

        EALLOW;
        SysCtrlRegs.WDCR= 0x0000;
        EDIS;

    after receive 'x' character. But MCU just halts but not restarts.

  • If you are connected to the CCS debugger, please try in standalone mode.

  • OK, I disconnected from CSS debugger but MCU still just halts but not restarts.

    I'm using the TMDSCNCD28035 F28035 Piccolo controlCARD with TMDSDOCK28035 F28035 Piccolo Experimenter's Kit.

  • I don’t understand what you mean by "just halts". The only way the device could "halt" is when you put the device in one of the 3 low-power modes (IDLE, STANDBY or HALT). Otherwise, as long as you are supplying power (and clock) to the device, the device has to be doing something. For example, if you simply power-up a device with no contents in Flash, WD would timeout and keep resetting the device. You can see the pulsing in the -XRS pin. If you don’t service the WD in time or if you write a bad key value, the device will get reset. The issue may be in how you determine a reset was asserted the WD. This is something you have to handle in your code and I am afraid I may not be able to help you there.

  • Hi . Let me explain. I took the Example_2803xSci_Echoback example and I want to implement soft reset functionality when I receive a "reset" command over SCI. But when I put:

        EALLOW;
        SysCtrlRegs.WDCR= 0x0000;
        EDIS;

    CPU won't restart but instead of this SCI module don't work - doesn't send end receive any data.

  • I suggest you write a separate code to test this. After coming out of reset, disable WD and toggle a GPIO pin. After a long delay, enable WD and write 0x0000 to WDCR. This should reset the device and cycle should repeat over and over again.