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.

CCS/TMS320F28027F: CCS Debug session resets intermittently

Part Number: TMS320F28027F
Other Parts Discussed in Thread: DRV8301, OPA2374, BOOSTXL-DRV8301

Tool/software: Code Composer Studio

Hello -

I have a custom hardware design, and am having a couple of issues bringing the board up. This is not my first design using InstaSPIN so I am not a newb per se.

I have remapped the PWM channels and ADC inputs, changed the necessary user.h values, and am running lab 5b (MW 16) with previously-identified motor values.

I should also preface that I am using a DRV8301 plus a third current shunt amplifier circuit. The third current shunt amp doesn't appear to be behaving properly on this board, so I have user.h set to use 2 current sensors.

The problem I am experiencing is that once I enable the run_identify flag, the motor does generally start spinning. However, at varying times (sometimes almost immediately, sometimes not for several minutes) the system will halt unexpectedly, and all of my watch variables in CCS (the default ones for lab 5b) are reset to their initial/default values. I can tell from setting breakpoints that when this occurs, main() is being executed again. This is only supposed to happen once at startup correct?

This issue is making it difficult to look for faults et al. since all of the debug values are lost/reset when this occurs.

Any help/insight would be greatly appreciated!

Best,

-asifjahmed

  • Does CCS post an error that connection with the debugger is lost?

    Sean
  • Hi Sean -

    Thanks for your reply. No - CCS does not lose connection with the debugger. When this reset occurs, I can generally just re-enable the enablesys and run_identify flags and the process repeats.

    However, occasionally I will trap an Illegal ISR condition, but am unable to tell what caused it.

    I have done quite a bit of testing now and it seems that with lab5b, if I start up with default speed reference (100rpm) and acceleration (200 rpm/s), the motor spins up fine 90% of the time, and will run indefinitely. However, if I command a higher speed, or apply even a gentle load on the motor, the issue occurs.

    Really appreciate any further help, I am so close to getting my custom board running.

    Best regards,

    -asifjahmed

  • Hard to tell without a specific error. I was thinking the system might be experiencing a brown-out caused by supply voltage droop during motor loading, but usually that entails CCS losing debug connection with the board. Are you able to scope the power supply rails during the time when you're experiencing this issue?

    Sean
  • Thanks Sean. I also suspected a brownout but figured since I wasn't losing debug (never) that probably wasn't it. I will try to get some scope captures of the power rails. Any other pointers as to what to look for?

    I did just make 2 discoveries on my board after careful scrutiny. Wondering if either of these could be contributing:

    -I forgot to put the recommended pulldown resistor on the DRV8301 EN_GATE pin. However, there is an internal pulldown and I am setting this GPIO low as soon as I initialize it. Doubt that is the problem

    -Since I am using DRV8301 I also have a third current shunt amplifier - using the OPA2374. The schematic is identical to the BOOSTXL-DRV8301, but I realized that I reversed the polarity of the inputs to the amp.... Could this be causing an issue, despite only having 2 current sensors configured in user.h?

    Will try to get the scope captures within a day. I really appreciate your continued help here, I really need to get this debugged!

    Best,
    -asifjahmed
  • OK, I have now scoped the power rails, and there is definitely significant noise. The noise obviously gets worse with motor speed, and it could certainly be causing an issue.

    To try and test whether its a noisy buck converter (DRV8301 buck), I have connected a test lead to the EN_BUCK pin of the DRV8301 and pulled that LOW. As expected, this disables the buck controller.

    However, now I hooked up an external 5V supply, and I can still connect to a JTAG debug session, but with this setup the motor does nothing, despite all data in CCS looking good. Both CTRL and EST say they are online and the motor just does not move.

    On another note, I cut traces and swapped the polarity of my 3rd (external) shunt amplifier input and voila - I have 3 working current sensors now. Unfortunately my problem still persists, though.

    Any insight into why my motor does not spin when using an external 5V power supply and after disabling the DRV8301 buck controller? the MCU is powered from a 3.3 LDO, supplied by the 5V supply.

    Please help!

    -asifjahmed

  • OK - I figured out the issue with my external power supply. I have combined the NFAULT, NOCTW, and PWRGD pins for the trip zone, so PWRGD was being asserted due to a LOW EN_BUCK. Doh! So I just commented out the Trip zone GPIO declaration temporarily, and things work as expected.

    Unfortunately, my issue still persists. I assembled and reflowed 2 more custom boards today, and the issue exists on all 3.

    What should I be looking at on the scope to check for excess noise/EMI as a potential cause of this?

    Any other tips, advice, etc. would be very much appreciated.