Chapter 4 Port Integration Module (S12XDP512PIMV2)
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor 225
4.3.2.32 Port M Data Direction Register (DDRM)
Read: Anytime.
Write: Anytime.
This register configures each port M pin as either input or output.
The CAN/SCI3 forces the I/O state to be an output for each port line associated with an enabled output
(TXCAN[3:0], TXD3). TheyAlso forces the I/O state to be an input for each port line associated with an
enabled input (RXCAN[3:0], RXD3). In those cases the data direction bits will not change.
The DDRM bits revert to controlling the I/O direction of a pin when the associated peripheral module is
disabled.
0x0252
76543210
R
DDRM7 DDRM6 DDRM5 DDRM4 DDRM3 DDRM2 DDRM1 DDRM0
W
Reset 00000000
Figure 4-34. Port M Data Direction Register (DDRM)
Table 4-33. DDRM Field Descriptions
Field Description
7–0
DDRM[7:0]
Data Direction Port M
0 Associated pin is configured as input.
1 Associated pin is configured as output.
Note: Due to internal synchronization circuits, it can take up to 2 bus clock cycles until the correct value is read
on PTM or PTIM registers, when changing the DDRM register.