R01UH0823EJ0100 Rev.1.00
Page 469 of 1823
Jul 31, 2019
RX23W Group
22. Multi-Function Pin Controller (MPC)
22.3
Usage Notes
22.3.1
Procedure for Specifying Input/Output Pin Function
Use the following procedure to specify the input/output pin functions.
(1) Clear the port mode register (PMR) to 0 to select the general I/O port function.
(2) Specify the assignments of input/output signals for peripheral functions to the desired pins.
(3) Enable writing to the Pmn pin function control register (PmnPFS) through the write-protect register (PWPR)
setting. (m = 0 to 4, B to E, J; n = 0 to 7)
(4) Specify the input/output function for the pin through the PSEL[4:0] bit settings in the PmnPFS register.
(5) Clear the PFSWE bit in the PWPR register to 0 to disable writing to the PmnPFS register.
(6) Set the PMR to 1 as necessary to switch to the selected input/output function for the pin.
22.3.2
Notes on MPC Register Setting
(1) Settings of the Pmn pin function control register (PmnPFS) should be made only while the PMR register for the
target pin is cleared to 0. If a Pmn pin function control register is set while the PMR register is 1, unexpected edges
may be input through the input pin or unexpected pulses are output through the output pin.
(2) Only the allowed values (functions) should be specified in the Pmn pin function control registers. If a value that is
not allowed for the register is specified, correct operation is not guaranteed.
(3) Do not assign a single function to multiple pins through the MPC settings.
(4) Analog input functions for the A/D converter are multiplexed with pins of ports 4 and E. If a pin is to be used as an
analog input, avoid loss of resolution by setting the given bits of the port mode register (PMR) and of the port
direction register (PDR) to 0, i.e. configuring the pin as a general-purpose input, and setting the PmnPFS.ASEL bit
to 1.
(5) Values of the TCEN time capture event input pin enable bits of time capture control registers y (RTCCRy, y = 0, 1)
are not defined after a reset. To prohibit unwanted input, set these bits to 0.
(6) Points to note regarding the port mode register (PMR), port direction register (PDR), and Pmn pin function control
register (PmnPFS) settings for pins that have multiplexed pin functions are listed in
.