
Obsolete
Product(s)
- Obsolete
Product(s)
ST72141K2
47/133
MOTOR CONTROLLER (Cont’d)
Demagnetization (D) Event
At the end of the demagnetization phase, current
no longer goes through the free-wheeling diodes.
The voltage on the non-excited winding terminal
goes from one of the power rail voltages to the
common star connection voltage plus the BEMF
voltage. In some cases (if the BEMF voltage is
positive and the free-wheeling diodes are at
ground for example) this end of demagnetization
can be seen as a voltage edge on the selected
MCIx input and it is called a hardware demagneti-
If enabled by the HDM bit in the MCRB register,
the current value of the MTIM timer is captured in
register MDREG when this event occurs in order
to be able to simulate the demagnetization phase
for the next steps.
When enabled by the SDM bit in the MCRB regis-
ter, demagnetization can also be simulated by
comparing the MTIM timer with the MDREG regis-
ter. This kind of demagnetization is called software
demagnetization DS.
If the HDM and SDM bits are both set, the first
event that occurs, triggers a demagnetization
event. For this to work correctly, a DS event must
not precede a DH event because the latter could
be detected as a Z event.
Software demagnetization can also be always
used if the HDM bit is reset and the SDM bit is set.
This mode works as a programmable masking
time between the C and Z events. To drive the mo-
tor securely, the masking time must be always
greater than the real demagnetization time in order
to avoid a spurious Z event.
When an event occurs, (either DH or DS) the DI bit
in the MISR register is set and an interrupt request
is generated if the DIM bit of register MIMR is set.
Warning 1: Due to the alternate automatic capture
and compare of the MTIM timer with MDREG reg-
ister by DH and DS events, the MDREG register
should be manipulated with special care.
Warning 2: To avoid a system stop, the value writ-
ten to the MDREG register in Soft Demagnetiza-
tion Mode (SDM = 1) should always be:
– Greater than the MCOMP value of the commuta-
tion before the related demagnetization
– Greater than the value in the MTIM counter at
that moment (when writing to the MDREG regis-
ter).
Figure 30. D Event Generation Mechanism
MTIM [8-bit Up Counter]§
DS
MDREG [Dn]
§
Compare
8
DH
DS
HDM bit
D = DH & HDM bit + DS & SDM bit
DH
SDM bit
F(x)
D
§ Register updated on R event
SDM bit
HDMn bit*
DH
or
1
2
20 s / C
CPBn bit*
C
DS,H
Sample
To Z event detection
SR bit
20
s
/
C
* = Preload register, changes taken into account at next C event
To interrupt generator
MCRA Register
MCRB Register