enCoRe™ V CY7C643xx, enCoRe™ V LV CY7C604xx TRM, Document No. 001-32519 Rev *H
55
General-Purpose I/O (GPIO)
assumes that the GIE is set, GPIO interrupt mask
is set, and that the IOINT bit was set to high. The Change
Interrupt mode relies on the value of an internal read regis-
ter to determine if the pin state changed. Therefore, the port
that contains the GPIO in question must be read during
every interrupt service routine. If the port is not read, the
Interrupt mode acts as if it is in high mode when the latch
value is ‘0’ and low mode when the latch value is ‘1’.
Figure 6-3. GPIO Interrupt Mode IOINT = 1
6.1.7
Data Bypass
GPIO pins are configured to either output data through CPU
writes to the PRTxDR registers or to bypass the port's data
register and output data from internal functions instead. The
bypass path is shown in
by the Alt Data input,
which is selected by the Alt Select input. These data bypass
options are selected in one of two ways.
■
For internal functions such as I2C and SPI, the hardwire
automatically selects the bypass mode for the required
pins when the function is enabled.
■
For all bypass modes, the wanted drive mode of the pin
must be configured separately for each pin, with the
PRTxDM1 and PRTxDM0 registers.
Last Value Read From Pin was ‘0’
Pin State
Waveform
Interrupt
Occurs
(a)
Pin State Waveform
GPIO Pin
Interrupt Enable
Set
Interrupt
Occurs
(b)
GPIO Pin
Interrupt Enable
Set
Last Value Read From Pin was ‘1’
Pin State
Waveform
GPIO Pin
Interrupt Enable
Set
Interrupt
Occurs
(c)
Pin State
Waveform
GPIO Pin
Interrupt
Enable Set
Interrupt
Occurs
(d)