R01UH0823EJ0100 Rev.1.00
Page 428 of 1823
Jul 31, 2019
RX23W Group
20. Event Link Controller (ELC)
(8) Restrictions on Writing to PODR and PDBF Registers
When the ELCR.ELCON bit is 1 (ELC function is enabled), write access to the PODR and PDBFn registers (n = 1, 2)
becomes disabled at the following conditions.
When a port is specified as a member of the input port group and when the event linkage is set, write access to the
corresponding bit in the PDBFn register becomes disabled. However, when the DOC is selected for event signal,
write access is enabled.
When a port is specified as a member of the output port group, write access to the corresponding bit in the PODR
register becomes disabled.
When a port is specified as a single output port and when the event linkage for the port is set by the ELSRn register,
write access to the corresponding bit in the PODR register becomes disabled. However, when the DOC is selected
for event signal, write access is enabled.
20.3.6
Example of Procedure for Linking Events
The following describes the procedure for linking events.
(1) Initialize the peripheral module (destination) that operates based on an event signal.
(2) When event linkage is set to a port, set the following registers corresponding to the port.
PODR register: Set the initial values of the output ports.
PDR register:
Set the I/O direction of the ports.
PGRn register:
To operate ports for a port group, select ports to be specified as port group members (n = 1, 2).
PGCn register:
Set the operation of the port group.
PELm register: When a port is operated as a single port, specify the port to be used, an operation of the port at an
input of event signal, and the event generation condition (m = 0 to 3).
(3) Set the number of the event signal to the ELSRn register corresponding to the destination peripheral module.
(4) To link an event to a timer module, set any of the ELOPA to ELOPD registers corresponding to the timer as
required.
(5) Set the ELCR.ELCON bit to 1, which enables linkage of all the events.
(6) Set the operation of the peripheral module (source) from which an event signal is output, and activate the module.
The preset operation of the destination peripheral module is started by the event signal that is output from the source
peripheral module.
(7) To stop event linkage of independent peripheral module, set 00h to the ELSRn register corresponding to the
peripheral module. To stop linkage of all the events, set the ELCR.ELCON bit to 0.
Note:
If event signal output from the RTC is to be used, make the ELC settings after the RTC settings (initialization,
time setting, etc.). Unintended events may be generated if RTC settings are made after the ELC settings.
Note:
When using event signal output from the LVD, set the LVD and then the ELC. Set the corresponding ELSRn
register to 00h and then disable the LVD.