CMS32L051 User Manual |Chapter 2 Pin Function
www.mcu.com.cn 21 / 703
2.3.1 Port mode register (PMxx)
When a port is used as a digital channel, this is the register that sets its input/output in bits. After
the reset signal is generated, the ports except the P130 port default to the input state. When using a
port pin as a pin for the multiplexed function, it must be set with reference to 2.5 Register Settings
When Using the Multiplexing Function.
Register address = base address + offset address; the base address of the PM register is
0x40040000, and the offset address is shown in the figure below.
Figure 2-1 Format of port mode register