Datasheet
ATD Registers
M68HC12B Family Data Sheet, Rev. 9.1
Freescale Semiconductor 281
FRZ1 and FRZ0 — Background Debug (Freeze) Enable Bits
When debugging an application, it is useful in many cases to have the ATD pause when a breakpoint
is encountered. These two bits determine how the ATD will respond when background debug mode
becomes active. See Table 17-1.
17.3.5 ATD Control Register 4
The ATD control register 4 (ATDCTL4) selects the clock source and sets up the prescaler. Writes to the
ATD control registers initiate a new conversion sequence. If a write occurs while a conversion is in
progress, the conversion is aborted and ATD activity halts until a write to ATDCTL5 occurs.
S10BM — ATD 10-Bit Mode Control Bit
0 = 8-bit operation
1 = 10-bit operation
SMP1 and SMP0 — Select Sample Time Bits
These bits are used to select one of four sample times after the buffered sample and transfer has
occurred. See Table 17-2.
PRS4–PRS0 — Select Divide-By Factor for ATD P-Clock Prescaler Bits
The binary value written to these bits (1 to 31) selects the divide-by factor for the modulo counter-based
prescaler. The P clock is divided by this value plus one, and then fed into a divide-by-two circuit to
generate the ATD module clock. The divide-by-two circuit ensures symmetry of the output clock signal.
Table 17-1. ATD Response to Background Debug Enable
FRZ1 FRZ0 ATD Response
0 0 Continue conversions in active background mode
01Reserved
1 0 Finish current conversion, then freeze
1 1 Freeze when BDM is active
Address: $0064
Bit 7654321Bit 0
Read:
S10BMSMP1SMP0PRS4PRS3PRS2PRS1PRS0
Write:
Reset:00000001
Figure 17-6. ATD Control Register 4 (ATDCTL4)
Table 17-2. Final Sample Time Selection
SMP1 SMP0
Final
Sample Time
Total 8-Bit
Conversion Time
Total 10-Bit
Conversion Time
0 0 2 ATD clock periods 18 ATD clock periods 20 ATD clock periods
0 1 4 ATD clock periods 20 ATD clock periods 22 ATD clock periods
1 0 8 ATD clock periods 24 ATD clock periods 26 ATD clock periods
1 1 16 ATD clock periods 32 ATD clock periods 34 ATD clock periods
