I'm working on a BLDC motor control project and I have the ftm's set up correctly for the outputs and inputs, however, I can only start the motor by first moving the motor shaft by hand to set a flag bit on a channel to start my commutation sequence. In other words, I need to know how trigger the interrupt I have set up for the halls with software so I can start the motor without touching it. Any ideas would be appreciated.
已解决! 转到解答。
Hi James,
if I understand well, you read halls state using input capture. If the motor is stopped, there is no capture event, which would read the halls state and commutate the motor. There is no way how to force capture event by the software. For correct start of the BLDC motor you need to read initial rotor position and apply correct voltage according to required direction of rotation. Applying the voltage on the motor the rotor will move and the commutation will continue via input capture interrupt. This start up sequence you need to apply any time there is request to run motor. Simply said, you need to run the same code you have your interrupt routine (halls state reading + commutation routines) during every motor start up.
Hi James,
if I understand well, you read halls state using input capture. If the motor is stopped, there is no capture event, which would read the halls state and commutate the motor. There is no way how to force capture event by the software. For correct start of the BLDC motor you need to read initial rotor position and apply correct voltage according to required direction of rotation. Applying the voltage on the motor the rotor will move and the commutation will continue via input capture interrupt. This start up sequence you need to apply any time there is request to run motor. Simply said, you need to run the same code you have your interrupt routine (halls state reading + commutation routines) during every motor start up.