st7pmc2s6 STMicroelectronics, st7pmc2s6 Datasheet - Page 228

no-image

st7pmc2s6

Manufacturer Part Number
st7pmc2s6
Description
8-bit Mcu For Automotive With Nested Interrupts, Flash, 10-bit Adc, Brushless Motor Control, 5 Timers, Spi, Linsci?
Manufacturer
STMicroelectronics
Datasheet
On-chip peripherals
Note:
228/371
Hall sensors (or equivalent sensors providing position information) are widely used for motor
control. There are two cases to be considered:
Hall sensors are usually arranged in a 120° configuration. In that case they provide 3 ppr
with both rising and falling edge triggering; the tachogenerator measurement method can
therefore be applied. The main difference lies in the fact that one must use the position
information they provide. This can be done using the three MCIx pins and the analog
multiplexer to know which of the three sensors toggled; an interrupt is generated just after
the expected transition (refer to
As described in
sensor. This means that most of delay manager registers are used for a different purpose,
with modified functionalities.
For greater precision, the MTIM up-counter is extended to 16 bits using MTIM and an
additional MTIML register. On a capture event, the current counter value is captured and the
counter [MTIM:MTIML] is cleared. The counting direction is not affected by the EDIR bit
when using an encoder sensor.
A 16-bit capture register is used to store the captured value of the extended MTIM counter:
the speed result is either a period in clock cycles or a number of encoder pulses. This 16-bit
register is mapped in the MZREG and MZPRV register addresses. To ensure that the read
value is not corrupted between the high and low byte accesses, a read access to the MSB of
this register (MZREG) locks the LSB (that is, MZPRV content is locked) until it is read and
any other capture event in between these two accesses is discarded.
A compare unit allows a maximum value to be entered for the tacho periods. If the 16-bit
counter [MTIM:MTIML] exceeds this value, a speed error interrupt is generated. This may be
used to warn the user that the tachogenerator signal is lost (wires disconnected, motor
stalled,...). As 8-bit accuracy is sufficient for this purpose, only the MSByte of the counter
(that is, MTIM) is compared to 8-bit compare register, mapped in the MDREG register
location. The LSByte is nevertheless compared with a fixed FFh value. Available values for
comparison are therefore FFFFh, FEFFh, FDFFh, ..., 01FFh, 00FFh.
This functionality is not useful when using an encoder. With an encoder, user must monitor
the captured values by software during the periodic capture interrupts: for instance, when
driving an AC motor, if the values are too low compared to the stator frequency, a software
interrupt may be triggered.
BLDC motor or six-step synchronous motor drive; ‘sensor mode’ is recommended in
this case, as most tasks are performed by hardware in the delay manager.
BLAC, asynchronous or motors supplied with 3-phase sinewave-modulated PWM
signals in general. In this case ‘speed sensor mode’ allows high accuracy speed
measurement (the sensor mode of the delay manager being unsuitable for sinewave
generation). Position information is handled by software to lock the statoric field to the
rotoric one for driving synchronous motors.
Figure
ST7MC1K2-Auto, ST7MC1K6-Auto, ST7MC2S4-Auto, ST7MC2S6-Auto
103, the MTIM timer is re-configured depending on the selected
Figure
102).

Related parts for st7pmc2s6