Other Parts Discussed in Thread: DRV8301, MOTORWARE
I inherited a TI Instaspin motorware based project that runs on a custom board using a DRV8301. The project was based on proj_lab11a so much so my predecessor didn't even bother to create a new instance and just edited the original V16 project. I've been tasked with updating the project to V18 and getting rid of the bloat in the code. To that end I've Exported/Imported proj_lab11a V18 and renamed it to a new project. After changing several CCS include paths and variables I've gotten it to compile properly. I've gone through his code line by line and updated user.c, user.h, hal.h, hal.c and hal_obj.c to add in the fairly simple IO of the custom board. Before I proceed with adding the rest of the to main and mainISR in the main project I wanted to spin the motor just to see if there was control.
At this point it doesn't seem to be "controlling" the motor. While watching the expression during debug I can see a couple of things that don't make sense. The gMotorVars.Speed_krpm expression is bouncing around positive and negative. In addition gMotorVars.VdcBus_kv is bouncing around which makes me think somethings not write with the Adc read.
Any help on where to investigate next would be appreciated.
Thanks, John