2025-03-06 10:12 AM
I am working on a system that the on/off button only switches the high-voltage power source. The processor and IPM continue to run.
First problem we had was that you cannot clear faults or execute the MC_StopMotor1() function because the system is still running and generating under voltage faults. We worked around this by not doing anything until the power was turned back on.
The scary problem is that, when the power comes back, the system spastically jumps in one direction or the other. My assumption is that it is trying to complete its last movement from before the power was turned off. I have tried numerous function calls and we have even dug into the bottom layers of the library to try to figure out which fields to clear. I was really hoping that there was a simple reset function, but I sure don't see it.
Right now, I'm looking at saving some state info in NVD and issuing a call to NVIC_SystemReset().
Did I miss something? Any chance that someone has a better solution?