Chapter 17 Stepper Stall Detector (SSDV2) Block Description
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
Freescale Semiconductor
637
Figure 17-15. Return-to-Zero Flowchart
Advance Pointer
Initialize SSD
Start Blanking
Start Integration
Disable SSD
End of
Blanking?
End of
Integration?
Stall
Detection?
Using Motor Control module, drive pointer to within 3 full steps of
calibrated zero position.
1. Clear (or set) RCIR; clear (or set) POL;
2. Set MCZIE; clear MODMC; clear (or set) PRE; set MCEN.
3. Set RTZE; set SDCPU; write ACLKS (select sample frequency).
4. Store threshold value in RAM.
1. Clear MCZIF.
2. Write MDCCNT with blanking time value.
3. Clear ITG; clear (or set) DCOIL; increment (or decrement) STEP for
CCW (or CW) motion.
MDCCNT = 0x0000? or MCZIF = 1?
1. Clear MCZIF.
2. Write MDCCNT with integration time value.
3. Set ITG; set DCOIL.
MDCCNT = 0x0000? or MCZIF = 1?
Yes
No
Yes
No
ITGACC < Threshold (RAM value)?
1. Clear MCZIF.
2. Clear MCEN.
3. Clear ITG.
4. Clear RTZE; clear SDCPU.
Yes
No