Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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: PWM not working properly

Part Number: TMS320F28035
Other Parts Discussed in Thread: DRV8301

Hello everyone,

I wondering if anyone has come across the following issue with the PWM outputs on the F28035:   I can power up my board and get really weak signals (mV range) on my PWM pins.  However, the PWM outputs have LED indicators connected to them and are lighting up in the sequence I have programmed them to do.  I also have a switch that I am using to Increase the duty cycle and another switch I am using to decrease the duty cycle.  When I use the switches to change the duty cycles, the LEDs respond as expected but with the same low mV range voltage.  However, if I hit the reset button on my board, the MCU comes back on and the PWM signals are operating in the expected voltage range.  If anyone has had such a problem with the PWM outputs, could you please enlighten me.  I have tried to figure this out for a while.  The only thing I can think of that would cause this problem is that the MCU is bad.  If so, have any of you had any experience where the PWM causes the MCU to get damaged?  I am afraid this might be a layout issue with the board as well but not sure.  Thank you.

-Brandon

  • Brandon,

    Could you please provide more information about your board? Is this board a C2000 development board or is it your own design? Also, can you provide more information on how the PWM outputs are driving or sinking the LED indicators? Thanks.

    - Ken
  • Ken,

    The board is a custom board that my team has designed for our Senior Design project.  We are designing a motor controller using the F28035 and the DRV8301 gate driver.  The pwm pins are sourcing the LEDs.  The LEDs have a forward voltage drop of 1.75V and the high level output of the pwm signals are about 3.25V, which gives me about 2mA of current being sourced by the pwm.  Also, which is not shown on the schematic, the pwm lines have no other components in series with the MCU pwm outputs and the DRV8301 pwm inputs.  The DRV8301 should be sinking about 3.25V/100kohm=32.5uA.  So the total current being sourced by the pwm pins is no more than 2.5mA, which is well below the maximum current allowed for the MCU outputs.  If you need any other information please let me know, and thank you for your help

    -Brandon

  • Just an update.......Something weird happened with my MCU this morning. I was taking some measurements on my board, and when I turned my board off and back on the board acted like it was stuck in reset. I tapped my MCU a couple times and the MCU came out of reset (I know this is an "engineering" way to solve a problem LOL). I have had a similar issue in the past but thought the problem was fixed (I had TEST 2 pin connected to ground but fixed it to be NC and had no more problems for a while with the MCU). One question comes to mind, which may not be related at all. I have my TDI and TDO for JTAG connected directly to the MCU but have a LED connected to each line the same way I do for the PWM inputs. Will this have an effect on the JTAG since the data lines have internal pullups on the MCU? Just a thought. Thanks again.

    -Brandon
  • Brandon,

    I would recommend that you remove as many of the LED loads as possible to see if the problems improve or go away. While each pin can provide a maximum of +/- 4mA individually, the device will probably struggle to deliver +/- 4mA on all pins simultaneously. Consider the fact that there are only two VDDIO pins to power both VDD and all of the IO buffers.

    Your LED paths also have lower resistance than your digital endpoints so if the system is current starved, the available power will go to the LEDs rather than the digital endpoints.

    -Tommy

  • Tommy,

    The only LED's I have on now are two pwm LEDs at any given time and one power on indicator. I have taken off the LEDs on the JTAG and four other LEDs that were being used to that indicate CAN and RS232 TX and RXD data. However, I still am having the same issues. However, I did find out something interesting. When I had the LEDs connected to the JTAG data lines I was getting 1.8V at TDI and TDO without JTAG connected. When I disconnected the LEDs I was getting about 3.3V on the TDI and TDO lines without JTAG connected. What value should TDI and TDO be without JTAG connected?

    -Brandon
  • Brandon,

    I think the JTAG pins are HIGH-Z (floating) when the emulator is disconnected. I think TDI and TDO have weak pull-ups so it should be close to your VDDIO voltage.

    Are you monitoring any signals using the EPWM DC or TZ submodules? If so, be aware that the Trip-Zone Control (TZCTL) register has a default action of putting the EPWM pins into a HIGH-Z state when an event is qualified. This often looks like faulty output behavior. Unwanted TCZTL fields should be changed to Do Nothing.

    -Tommy
  • Tommy,

    Do you think that my JTAG TDI could cause the MCU to get corrupted since it was clamped at 1.8V max by the LED? I am going to replace the MCU now because it is acting weird. It has been getting stuck in reset and I would have to either connect and disconnect JTAG to get it out of reset or sometimes I could just tap on the MCU. This has happened in the past but was assumed to be fixed (I had TEST 2 pin connected to ground and it should have been floating). I think the MCU is an the edge of total failure now. I don't know that the Trip-Zone modules have affected the pwm behavior seeing that the pwm has been operating fine for over a week now. I will let you know if the issue is resolved when replacing the MCU. However, I wish I could figure out why this keeps happening after the board works fine for while. Thanks for all your help.

    -Brandon
  • Brandon,

    Incorrect voltage levels on any JTAG signal can certainly lead to disconnects and data corruption.  Are you seeing periodic resets on the XRS pin?

    Keep in mind that TDO is also a boot mode selection pin so a bad voltage on that pin can put your device into the wrong state after reset:

    -Tommy

  • Tommy,

    Sorry, but I had already replaced the MCU before I seen your post. I don't know if the XRS pin was being held low or not. I do know that I could press my reset button that is connected to the XRS pin and would have no response when the device was already stuck in reset. I will keep you updated once I flash the MCU.

    -Brandon
  • Tommy,

    Just to update.....I am not having an issue with the new MCU getting stuck in reset, other than if I power the board on and JTAG is connected then board is in reset (I don't know if this is normal or not). However, the issue with the PWM is still there. I believe that the issue may be with the DRV8301. Is it possible for the DRV8301 to hold the PWM inputs low just on the INH_A, INH_B, and INH_C? I am also getting a OCTW report with the OCP disabled (with and without a load on my three phase inverter, which works fine once the high PWMs are working). I can still hit the reset button on my MCU and then the high PWM inputs start working again. Is it possible that the PWM LEDs are pulling too much current from the DRV8301 inputs (if that's even possible)? Thanks again. I really appreciate you taking the time to help me.

    -Brandon
  • Tommy,

    Sorry to make this blog become more about the DRV8301 now, but I am uploading my schematic for the DRV8301. We are not using the buck converter. So we tied the EN_BUCK pin to ground. However, all the other pins relating to the buck converter are floating. We also have LEDs on the Fault and OCTW pins instead of strictly pull up resistors. Is it possible that this setup could be affecting the PWM input logic, and possibly causing damage to the MCU and/or DRV8301?

    -Brandon
  •  Here is my schematic:

  • Brandon,

    I am not familiar with DRV8301 so I cannot give you any concrete guidance.  I would not expect any damage with your described configuration, but it does look like the LED path might conduct more current than the datasheet recommendation of 2mA.

    Do you have isolation on the JTAG interface?

    -Tommy

  • Tommy,

    Thank you for the response.  I had not noticed the recommended max current for the fault and octw pins was 2mA (I had only looked at where the absolute max was 7mA).  I decided to take these off anyways and just turn on an LED powered by the MCU and use software to drive the LEDs instead of the DRV8301 hardware.  Also,  I believe that the LEDs on the high side pwm inputs for the DRV8301 might be causing issues.  I am going to replace the DRV8301 and remove all the pwm LEDs and see if the problems occur again.  Thanks again for the help.

    -Brandon

  • Tommy,

    I found out what was causing the problem on the PWM. I had declared a variable for my PWM period called "countMax." When I configured my PWM modules I used "countMax" in my code to set the PWM period. However, I did not realize I had not given the variable until after the PWM modules were configured. So the PWM period value began with what ever random value was given in "countMax" memory location, but when I reset the MCU the PWM modules configured again using the period value I had assigned to "countMax" memory location (I had the PWM period set only once in my code and used a while loop to keep from re-initializing everything). Now that I have "countMax" setup to initialize before configuring the PWM modules, the PWMs come on when I power up the board. I have not had any problems with the board anymore so far. So I guess I will say this problem has been resolved! : )

    Thanks for all your help,
    -Brandon
  • Brandon,

    I'm glad that you found the problem. Thanks for sharing your resolution.

    -Tommy