Datasheet

Table Of Contents
Is the AVAILABLE bit set and the FULL bit unset. If so go to the data phase, unless the STALL bit is set in which case the
device controller will reply with a STALL.
DATA phase:
Store received data in buffer. If Isochronous go to STATUS phase. Otherwise go to ACK phase.
ACK phase:
Send ACK. Go to STATUS phase.
STATUS phase:
See status phase from Section 4.1.2.6.2. The only difference is that the FULL bit is set in the buffer control register to
indicate that data has been received whereas in the IN case the FULL bit is cleared to indicate that data has been sent.
4.1.2.6.4. Suspend and Resume
The USB device controller supports both suspend and resume, as well as remote resume (triggered with
SIE_CTRL.RESUME), where the device initiates the resume. There is an interrupt / status bit in SIE_STATUS. It is not
necessary to enable the suspend and resume interrupts, as most devices do not need to care about suspend and resume.
The device goes into suspend when it does not see any start of frame packets (transmitted every 1ms) from the host.
NOTE
If you enable the suspend interrupt, it is likely you will see a suspend interrupt when the device is first connected but
the bus is idle. The bus can be idle for a few ms before the host begins sending start of frame packets. You will also
see a suspend interrupt when the device is disconnected if you do not have a VBUS detect circuit connected. This is
because without VBUS detection, it is impossible to tell the difference between being disconnected and suspended.
4.1.2.6.5. Errata
There are two hardware issues with the device controller, both of which have software workarounds. See and RP2040-E2
and RP2040-E5 for more information.
4.1.2.7. Host Controller
The host controller design is similar to the device controller. All transactions are started by the host, so the host is always
dealing with transactions it has started. For this reason there is only one set of endpoint control / endpoint buffer control
registers. There is also additional hardware to poll interrupt endpoints in the background when there are no software
controlled transactions taking place.
The host needs to send keep-alive packets to the device every 1ms to keep the device from suspending. In Full Speed
mode this is done by sending a SOF (start of frame) packet. In Low Speed mode, an EOP (end of packet) is sent. When
setting up the controller, SIE_CTRL.KEEP_ALIVE and SIE_CTRL.SOF_ENABLE` should be set to enable these packets.
Several bits in SIE_CTRL are used to begin a host transaction:
SEND_SETUP - Send a setup packet. This is typically used in conjunction with RECEIVE_TRANS so the setup packet will be
sent followed by the additional data transaction expected from the device.
SEND_TRANS - This transfer is OUT from the host
RECEIVE_TRANS - This transfer is IN to the host
START_TRANS - Start the transfer - non latching
STOP_TRANS - Stop the current transfer - non latching
PREAMBLE_ENABLE - Use this to send a packet to a Low Speed device on a Full Speed hub. This will send a PRE token
packet before every packet the host sends (i.e. pre, token, pre, data, pre, ack).
RP2040 Datasheet
4.1. USB 388