English
Language : 

AN1905 Datasheet, PDF (42/77 Pages) STMicroelectronics – ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
MTC_R_Z_IT
Synopsis
#include "mtc.h"
void MTC_R_Z_IT(void)
Description
See also
This function is dedicated to the Zero-Crossing and Ratio Increment/
Decrement interrupt service routines. Figures 20, 21, 22, 23, 24 & 25
show the routine flowcharts.
ST7MC Datasheet: MTC chapter.
Figure 20. Z event processing (sensorless mode only)
Z interrupt request?
yes
no
Autoswitchmode?
Save MZREG value and
prescaler ratio into Step_Z buffer
(save step time between two
zero crossing events)
BemfCounter++
no
Correct number of
yes
Successive Bemf detected?
Center last zerocrossing in the middle
of 2 C events (MCOMP = MZREG x 2)
MotorStatus = LAST_FORCED_SWITCH
Return from interrupt
42/77