Now, my motor with gear box (1:40) can be identified by MPET: R=0.465Ω, L=0.37mH, Ke=78mV/Hz, speed closed loop Kp=0.077, Ki=0.077
According to the errata, I use SPEED pin (PWM mode) to control the speed and I don't access registers when duty > 0. All seems fine, the motor can run up to the maximum speed 1800rpm.
OK, then I try to change direction. Since the DIR pin is not connected to main CPU, I have to use I2C to change register DIR_INPUT. The I2C command is sent only after motor is fully stopped.
Here is the test: CW few seconds --> stop --> set DIR_INPUT=2 --> CCW few seconds --> stop --> set DIR_INPUT=1 --> CW few seconds......
But two strange things happen:
(1) Sometimes the motor doesn't start and a FAULT triggered: ABN_BEMF. This is usually happened in CCW direction. After FAULT is cleared, the motor can be started again. The motor rated current is 3.2A. I increase the IPD current from 2A to 3A but no help. I use IPD to start motor since the other methods can't. Is it okay to increase IPD current over the rated current?
(2) Sometimes the motor doesn't start and no FAULT triggered. No thing! I try to set duty=0 and access the registers to check its status, but unable to do that. The controller is dead. I have to power-cycle to get it back alive. Any idea?
For (1), because the nFAULT pin is connected to main CPU, I can let it automatically recover and re-try the last command. But for (2), it is not acceptable to power-cycle the system. Is there anything I can do to prevent it from out of control?
Btw, when will be the revised MCF8316A chip (with known errata fixed) available? I use MCF8316A for factory automation and the schedule is pretty tight. I have to find a way to make it work stably either by software workaround or replacing it by revised chip.