![Freescale Semiconductor MC9S12ZVM series Reference Manual Download Page 72](http://html1.mh-extra.com/html/freescale-semiconductor/mc9s12zvm-series/mc9s12zvm-series_reference-manual_2330602072.webp)
Chapter 1 Device Overview MC9S12ZVM-Family
MC9S12ZVM Family Reference Manual Rev. 1.3
72
Freescale Semiconductor
1.13.5
BLDC Six-Step Commutation
1.13.5.1
Hall Sensor Triggered Commutation
Figure 1-12. BLDC Configuration With Hall Sensors
This BLDC application uses Hall sensor signals to create commutation triggers. The integrated sense
amplifier and an ADC module are used to measure DC bus current, for torque calculation. The DC bus
voltage measurement is used in the control algorithm to counter-modulate the PWM such that the variation
of the DC-bus voltage does not affect the motor current closed loop. The configuration is as follows:
1. Connect the three Hall sensor signals from the motor to input pins PT3-1.
2. Set [T0IC1RR=1] in the register MODRR2 to establish the link from Hall sensor input pins to TIM
input capture channel 1.
3. Setup TIM IC1 for speed measurement of XORed Hall sensor signals. Enable interrupt on both
edges.
4. Enable TIM OC0 and select toggle action on output compare event: TCTL2[OM0:OL0]=01.
5. Configure PMF for edge-aligned PWM mode with or without restart at commutation:
PMFENCx[RSTRT]. If using the restart option, then select generator A as reload signal source and
keep the following configurations at their default setting: multi timebase generators
(PMFCFG0[MTG]=b0), reload frequency (PMFFQCx[LDFQx]=b0), prescaler
(PMFFQCx[PRSCx]=b00).
6. Enable PMF commutation event input: PMFCFG1[ENCE]=1.
PMF
PTU
ADC0
GDU
M
reload
glb_ldok
dc_bus_voltage
trigger_0
dc_bus_current
TIM
PIM
Hall
EVDD1
PT1
PT2
PT3
XOR
IC1
Sensor
commutation_event
reload
PTIT
async_reload
async_reload
OC0