![Freescale Semiconductor MC9S12ZVM series Reference Manual Download Page 67](http://html1.mh-extra.com/html/freescale-semiconductor/mc9s12zvm-series/mc9s12zvm-series_reference-manual_2330602067.webp)
Chapter 1 Device Overview MC9S12ZVM-Family
MC9S12ZVM Family Reference Manual Rev. 1.3
Freescale Semiconductor
67
•
PMF (to generate main synchronous events for PTU and ADC)
•
PTU (to generate delay relative to synchronous events generated by PMF)
•
ADC (to acquire analog signals under synchronous control)
•
GDU (zero crossing comparators, Back-EMF muxing) [application dependent]
The TIM OC0 channel identifies the commutation event and restarts the PMF counter. In order to establish
this link TIM and PMF need to be configured and started. Then to sample accurately within one PMF cycle
the PTU needs to be used, so the next step is to configure the PTU to establish PMF to PTU link. The PTU
sends triggers to the ADC to perform a measurement of control signals. So the next step is to configure the
ADC. In some cases the GDU involvement is required and therefore configured.
The control action involves the PMF (to generate the duty cycle for GDU) and the GDU (to propagate the
signal to the MOSFETs). Since the PMF has already been configured for the measurements, only the GDU
need be configured to complete startup. Sometimes the GDU can be configured earlier but the GDU output
is always enabled last.
The recommended startup sequence is summarized as follows:
•
Configure TIM and PMF to establish the link between TIM OC0 commutation event and PMF
•
Configure PTU to establish the PMF to PTU link and ensure correct sampling within PMF cycle
•
Configure the ADC
•
Configure the GDU
1.13.3.9
Control Loop Shutdown Guidelines
1. Remove energy stored in the system after the power stage
kinetic energy - stop all rotating/moving mass
magnetic energy - gracefully drive currents to zero
2. Put GDU and PMF outputs to safe state
1.13.3.10 Control Loop Stop Mode Considerations
In Stop mode the PWM, PTU, ADC can not run because the bus clock is not running. Thus the GDU must
transition to a disabled state. Before entering Stop mode the application must perform the following steps:
1. Remove energy stored in the system after the power stage
kinetic energy - stop all rotating/moving mass
magnetic energy - gracefully drive currents to zero
2. Put GDU and PMF outputs to safe state
3. Verify GDU and PMF safe states
4. Verify fault flags and service if necessary
5. Execute the STOP instruction
The return from stop is expected in reverse order:
1. On returning from Stop mode the clocks are automatically enabled coherently
2. Initialize and check device proper functionality (charge pump etc.)