R01UH0823EJ0100 Rev.1.00
Page 926 of 1823
Jul 31, 2019
RX23W Group
32. USB 2.0 Host/Function Module (USBc)
32.3.3.2
NRDY Interrupt
On generating an internal NRDY interrupt request for the pipe whose PID[1:0] bits are set to 01b (BUF) by software, the
USB sets the corresponding NRDYSTS.PIPEnNRDY flag to 1. If the corresponding bit in the NRDYENB register has
been set to 1 by software, the USB sets the INTSTS0.NRDY flag to 1 and generates a USB interrupt.
The following describes the conditions on which the USB generates the internal NRDY interrupt request for a given
pipe.
Note that the internal NRDY interrupt request is not generated during setup transaction execution when the host
controller is selected. During setup transactions when the host controller is selected, the SACK or SIGN interrupt is
detected.
The internal NRDY interrupt request is not generated during status stage execution of the control transfer when the
function controller is selected.
(1) When Host Controller is Selected
(a) For the pipe in the transmitting direction:
On any of the following conditions, the USB detects an NRDY interrupt.
For the pipe for isochronous transfers, when the time to issue an OUT token comes while there is no data to be
transmitted in the FIFO buffer.
In this case, the USB transmits a zero-length packet following the OUT token and sets the bit corresponding to the
NRDYSTS.PIPEnNRDY flag and the FRMNUM.OVRN flag to 1.
During communications other than setup transactions using the pipe for the transfers other than isochronous
transfers, when any combination of the following two cases occur three consecutive times: 1) no response is
returned from the peripheral device (when timeout is detected before detection of the handshake packet from the
peripheral device) and 2) an error is detected in the packet from the peripheral device.
In this case, the USB sets the bit corresponding to the PIPEnNRDY flag to 1 and modifies the setting of the
PID[1:0] bits of the corresponding pipe to 00b (NAK).
During communications other than setup transactions, when the STALL handshake is received from the peripheral
device.
In this case, the USB sets the bit corresponding to the PIPEnNRDY flag to 1 and modifies the setting of the
PID[1:0] bits of the corresponding pipe to 11b (STALL).
(b) For the pipe in the receiving direction:
For the pipe for isochronous transfers, when the time to issue an IN token comes while there is no space available in
the FIFO buffer.
In this case, the USB discards the received data for the IN token and sets the PIPEnNRDY flag corresponding to the
pipe and the OVRN flag to 1.
When a packet error is detected in the received data for the IN token, the USB also sets the FRMNUM.CRCE flag to
1.
For the pipe for the transfers other than isochronous transfers, when any combination of the following two cases
occur three consecutive times: 1) no response is returned from the peripheral device for the IN token issued by the
USB (when timeout is detected before detection of the DATA packet from the peripheral device) and 2) an error is
detected in the packet from the peripheral device.
In this case, the USB sets the PIPEnNRDY flag corresponding to the pipe to 1 and modifies the setting of the
PID[1:0] bits of the corresponding pipe to 00b (NAK).
For the pipe for isochronous transfers, when no response is returned from the peripheral device for the IN token
(when timeout is detected before detection of the DATA packet from the peripheral device) or an error is detected in
the packet from the peripheral device.
In this case, the USB sets the PIPEnNRDY flag corresponding to the pipe to 1. (The setting of the PID[1:0] bits of
the pipe is not modified.)