CMS32L051 User Manual |Chapter 2 Pin Function
www.mcu.com.cn 22 / 703
2.3.2 Port register (Pxx).
This is the register that sets the value of the port output latch in bits. Reading this register in input mode
gives the pin level, while reading it in output mode gives the value of the port's output latch. After the reset
signal is generated, the value of the register becomes 00H.
Register address = base address + offset address; the base address of the port register is 0x40040000,
and the offset address is shown in the following figure.
Figure 2-2 Format of port register
Note: 1. The initial value must be set for the unassigned bits.
2. It indicates that it is limited to CMS32L051xx-S series products only. When the products are not CMS32L051xx-S
series, ports P60 and P61 are dedicated N-channel open-drain output ports, which can only output 0 and Hiz .