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: MCU come to a halt

Part Number: TMS320F28035

Dear everyone,

I am using TMS320F28035 for power supply control application, I got a problem that MCU (C2000) came to a halt accidently with about 5% rate.

Please give me advice about some reasons make C2000 come to a halt and the method to resolved it.

Thank you!

  • Hi Tien,

    Tien Truong DUc said:
    I got a problem that MCU (C2000) came to a halt accidently with about 5% rate

    How did you conclude the MCU halted and not stuck in illegal_isr or forever software loop? Do share any supporting data.

    Tien Truong DUc said:
    Please give me advice about some reasons make C2000 come to a halt and the method to resolved it.

    Implementing watchdog is the best solution to tackle such conditions.

    Regards,

    Gautam

  • Hi Gautam,

    Thank you for your reply,
    Frankly, I have not known whether MCU come to a halt or stuck in an forever software loop.
    Could you recommend me method to conclude what case MCU stopped?
  • Tien Truong DUc said:
    Could you recommend me method to conclude what case MCU stopped?

    Its always better to add hooks before any fault occurs. Anyways, are you generating any ePWMs? If yes, then please check the output.

    Regards,

    Gautam

  • Tien,

                came to a halt accidently” does not say much.

     

    1. Are you saying the device is "frozen"? i.e. simply stopped dead on its tracks?
    2. Or is it looping somewhere, say in ITRAP ISR?
    3. Does the problem happen with the JTAG connected?
    4. Is the Watchdog enabled? If so, is it not able to bring the device out of this situation?
    5. If it is not enabled, please enable it.
    6. Currently, how do you recover from this situation? Warm reset? POR? Power cycling?

     

    Please answer the above questions clearly.

     

  • Hi Gautam,

    Could you consider that adding hooks like GPIO state.. but how can I know whenever fault occurs?
    I have 3 PWM chanels, because my converter are in a box, when it stopped I cannot measure PWM but the output of converter is zero then maybe all PWM are low state. In addition, when it is stopped, it have no UART comunication, cannot implement back ground loop in which read status of button through GPIO to turn off another GPIO (relay control), I alter state of bottun but relay is still on.
  • Dear Mr Hareesh,

    Thank you for your reply,

    1. Are you saying the device is "frozen"? i.e. simply stopped dead on its tracks?
    * Yes, It goes to situation in which no UART communication, cannot implement back ground loop code that scan external button through GPIO, the state of an GPIO (relay control) is remain, and output of power supply is off.
    2. Or is it looping somewhere, say in ITRAP ISR?
    * I could not find it because my converter is in closed box. Could you tell me the way to check it?
    3. Does the problem happen with the JTAG connected?
    * It came to broke status from normal running without JTAG connection
    4. Is the Watchdog enabled? If so, is it not able to bring the device out of this situation?
    * Watchdog timer is disabled
    5. If it is not enabled, please enable it.
    * Yes, could you give me addition information about the reasons make MCU come to a halt (regardless software forever loop)
    6. Currently, how do you recover from this situation? Warm reset? POR? Power cycling?
    * If I turn off line power, wait for power totally goes out and turn it on again, It will get normal running with full function.
  • Tien Truong DUc said:
    In addition, when it is stopped, it have no UART comunication, cannot implement back ground loop in which read status of button through GPIO to turn off another GPIO (relay control), I alter state of bottun but relay is still on.

    SCI is interrupt based or polling based? Is this alteration of button to turn on/off relay done through UART?

  • Hi Gautam,

    SCI is interrupt based. Relay control function is implemented by check state of button and toggle gpio in back ground loop (timming by CPU timer).
  • Tien Truong DUc said:
    SCI is interrupt based. Relay control function is implemented by check state of button and toggle gpio in back ground loop (timming by CPU timer).

    As both of the above don't respond, it seems as if a trap is raised. Refer this post to quickly get an idea, just one possibility though:

    Regards,

    Gautam

  • Tien,

                Evidently, your system is getting affected by some type of noise and goes into an undeterminable state. It is important to determine two things here:

     

    1. What is causing this? (i.e. the "trigger" for this anomalous state). Identifying the cause would help in preventing this from occurring in the first place.
    2. Whether the code is looping somewhere (say, the ITRAP ISR) - in other words, the CPU is still active executing "something" (OR) the device is just frozen.

     

    If the CPU is looping somewhere, an active WD should be able to bring it out of this situation. This is the reason I asked you to enable the WD. If the device is "frozen", enabling the WD would not help.

     

    If you are using an external clock source, could you try changing to INTOSC1?

     

    Do you have a pull-down resistor on -TRST?

     

    Can you share the circuit connected to the -XRS pin?

  • Dear Hareesh,

    Thank you for your response,

    My converter used in important application like UPS, I don’t want to use WD.

    If you are using an external clock source, could you try changing to INTOSC1? Yes, I am using an external clock source, I suppose that it is more reliable than INTOSC, what do you want to concern about?

    Do you have a pull-down resistor on -TRST? Yes, I show you the schematic as bellowJTAG-SCH.docx

  • Tien,

                The WD is there to aid in recovery from a situation like this. Anyway, as an experiment, please do the following:

     

    1. Enable the WD. Modify your code to service it as needed. See if the WD is able to pull your system out of this anomalous condition.
    2. Change the clock source to INTOSC1. I am checking if the crystal osc circuitry is getting affected by noise. How do you handle a missing-clock condition in your application?
    3. I see a 4.7K pull-down on the -TRST pin. Change it to 100-ohms. Do not connect the emulator in this configuration, as it could potentially damage it.

    • How frequently does this happen?
    • Is it easy enough to reproduce it at-will?
    • Is there any external event that triggers this condition?


  • Dear Hareesh,

    Thank you for your response

    I will try methods that you recommend. As regard with missing-clock condition, what should I do? In my application, I just config device and clock system like Device Init file in Control Suite.

    In addition, as mentioned before, it happens accidentally with about 5% rate and it is not easy to reproduce, I feel that in case of continuous sudden changing in load will more easy lead to this situation.
    Maybe in this case the noise is so much, but I measured the noise of 3.3Vdc supplied for MCU, it is Ok, what additional signals I should check to find if the noise is really impact on it?
  • Tien,

                Please refer to the F2805x or F2806x TRM for information on how the Missing-Clock-Detect circuit works. But, I doubt you have a problem of missing clock, in which case your device would get reset.

     

    Noise can get coupled into the device through any pin, so just measuring the noise on the supply pins is not going to cut it. In any case, you need to measure the noise when the disturbance is actually happening. Please do try out my suggestions. Problems like this are extremely difficult to debug without being physically present near the system. We need to try many experiments to eliminate possible causes.

  • Dear Hareesh,

    After some days trying to reproduce situation, I got it again, and I measured some signal and inform you as following:
    - All of PWM outputs are off
    - JTAG pins (TMS, TDI, TDO, TCK) is at High logic, nTRST pin voltage equal 0V
    - I have two GPIOs are configed as output, voltage of fisrt pin is 0.67V, other GPIO output voltage is 1.14V.

  • Tien,

                Your observations don’t convey much. Unless you try out the experiments I had suggested earlier, further progress is not possible.

     

    1. Enable the WD. Modify your code to service it as needed. See if the WD is able to pull your system out of this anomalous condition.
    2. Change the clock source to INTOSC1. I am checking if the crystal osc circuitry is getting affected by noise. How do you handle a missing-clock condition in your application?
    3. I see a 4.7K pull-down on the -TRST pin. Change it to 100-ohms. Do not connect the emulator in this configuration, as it could potentially damage it.

     

    Let me reiterate that my ability to help is limited, since I don’t have access to the schematics/layout and most importantly to the hardware itself.

     

  • Tien,

       Were you able to complete the experiments I had suggested?

  • Tien,
    We haven't heard from you in a while and hope you have been able to resolve the issue. Let us know if that is not the case.