Parallel ports UM0404
156/564 DocID13284 Rev 2
The Table 24 summarizes the alternate functions of Port4 depending on the number of
selected segment address lines (coded via bit-field SALSEL).
Relative priority of Port4 alternate functions
When SALSEL = ’10’, CAN1 and CAN2 cannot be used: it means that external memory has
higher priority on CAN alternate function. On the contrary, once I
2
C is enabled, P4.4 and
P4.7 are dedicated to I
2
C: it means that I
2
C has higher priority on CAN alternate functions
and segment address functions as well. If SALSEL = ’10’ (8 segment address lines are
enabled) and I
2
C is enabled then:
• P4.4 and P4.7 are dedicated to I2C and used as SCL and SDA respectively
• P4.5 and P4.6 continues to output address lines.
Figure 38. Port4 I/O and alternate functions
Table 24. Port4 alternate functions
Port4
Standard function
SALSEL = 01
64 Kbytes
Alternate function
SALSEL = 11
256 Kbytes
Alternate function
SALSEL = 00
1 Mbyte
Alternate function
SALSEL = 10
16 Mbytes
P4.0
P4.1
P4.2
P4.3
P4.4
P4.5
P4.6
P4.7
GPIO
GPIO
GPIO
GPIO
GPIO/CAN2_RxD/SCL
GPIO/CAN1_RxD
GPIO/CAN1_TxD
GPIO/CAN2_TxD/SDA
Segment Address A16
Segment Address A17
GPIO
GPIO
GPIO/CAN2_RxD/SCL
GPIO/CAN1_RxD
GPIO/CAN1_TxD
GPIO/CAN2_TxD/SDA
Segment. Address A16
Segment Address A17
Segment Address A18
Segment Address A19
GPIO/CAN2_RxD/SCL
GPIO/CAN1_RxD
GPIO/CAN1_TxD
GPIO/CAN2_TxD/SDA
Segment Address A16
Segment Address A17
Segment Address A18
Segment Address A19
Segment Address
A20/SCL
Segment Address A21
Segment Address A22
Segment Address
A23/SDA
Port4
Alternate Functions
a)
b)
P4.7
P4.6
P4.5
P4.4
P4.3
P4.2
P4.1
P4.0
-
-
-
-
-
-
-
-
A23
A22
A21
A20
A19
A18
A17
A16
-
-
-
-
-
-
-
-
CAN2_TxD / SDA
CAN1_TxD
CAN1_RxD
CAN2_RxD / SCL
A19
A18
A17
A16
-
-
-
-
-
-
-
-
General Purpose Segment Address
LinesInput / Output
CAN / I
2
C I/O and Segment
Address Lines