Stepper Stall Detector (SSDV1) Block Description
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor
715
Figure 21-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; clear (or set) SMS;
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
electronic components distributor