I'm developing a drive for three phase PM and induction motors and was trying to figure out how to sample the ADCs properly. The root of my problem is that I can only sample the voltage across the shunt resistors when the low side is on, but the low side is of inverse polarity. I have gotten the drive to output normally for testing purposes, so I know that my PWM initialization is working correctly, but when I go to sample the ADCs for current reading, and eventually for my sensorless control, I get garbage.
What I want to do is have my ISR trigger off the PWM, which I already do on another drive, and the ADC to sample when the low side is on. I'm struggling to initialize the PWM and the ADC to work that way with the low side being active low. Any pointers would be helpful, and I can post more information if needed.
Forgot to add that I'm running the TMS320F28034/35 with voltage and current sense on all three legs, as well as DC bus and IGBT temperature. I already have most of my code done as the majority of the code will be ported from another drive I did, but both polarities are the same on the gatedrives and uses hall effect sensors instead of shunts. Also using standard C in CCS 6 and control suite motor libraries with a custom SMO.
Thanks!