CMS32L051 User Manual |Chapter 2 Pin Function
www.mcu.com.cn 28 / 703
2.3.8 Port mode control register (PMCxx)
The PMC register sets the port in bits to be used as a digital input/output or as an analog channel.
After the reset signal is generated, P10, P26, P130 are used as digital channels by default (PMC10,
PMC26, PMC130 reset value is 0,), and other ports are used as analog channels by default. P40, P41, P60,
P61, P122~P124, P137 only has digital function and cannot be used as an analog channel.
Register address = base address + offset address; the base address of the PMC register is 0x40040000,
and the offset address is shown in the figure below.
Figure 2-8 Format of port mode control register
Selection of digital input/output or analog input for the Pmn pin (m=0~3, 5~7, 12~14, n=0~7)
Note: 1. The initial value must be set for the unassigned bits.
2. It is limited to CMS32L051xx-S series products. For products other than the CMS32L051xx-S series, ports P60, P61
can only be used as digital pins.
3. Ports P40, P41, P121~P124, P137 are not supported as analog channels.
4. P10, P26, P130 are used as digital channels by default after reset.
5. In addition to the above ports, other ports are used as analog channels by default after reset.