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.
Tool/software: Code Composer Studio
I have two boards. One uses ADC B0, B2, B3 to read current from the 3 phases. This board works perfectly, and I can control the speed of the motor easily. Here's the phase current switching when the motor is not spinning (target speed = 0 rpm):
The other board uses ADC A1, B3, B1 to read current. This is done to make use of the analog comparators, but those are not being used at the moment. This current sensor signal comes in as 1/3 of the value on the other board such that the gain of 3 on these ADC pins can be applied. I can see in the ADC registers that this all works correctly.
When I try to run the exact same program (a modified version of instaspin foc lab 5b) on this board, the only change I make is in moving the ADC current pins in hal.c. When I run the program, it trips for any target speed > 0. When I hold it at 0 rpm, I see this waveform:I cannot find any issues in hardware that could be causing this. To me it seems that the deadband time differs, but I believe this is set and unchanged in the project. Could there be some floating point value causing this discrepancy?
Did you use the on-chip PGA? And did you try to use the lab02b or lab02c to verify the hardware board or ADC configuration if these two boards can get the similar motor parameters? If not, you have to check the ADC configuration in the project or the current & voltage sensing circuit on the hardware board.
Any updates? I’m assuming you were able to resolve your issue. Please let me know if you have any questions. We would like to close this thread if no further questions. Thanks.