Datasheet

Table Of Contents
NOTE
If you disconnect the USB cable during a packet in either host or device mode you will see errors raised by the
hardware. Your software will need to take this scenario into account if you enable error interrupts.
4.1.2.4. Serial TX Engine
The serial transmit engine is a mirror of the serial receive engine. It is connected to the currently active controller (either
device or host). It creates TOKEN and DATA packets, including calculating the CRC, and transmits them on the bus.
4.1.2.5. DPSRAM
The USB controller has 4K (4096 bytes) of DPSRAM (Dual Port SRAM). The DPSRAM is used to store control registers and
data buffers. From the AHB-Lite bus this is 32-bit wide memory with DWORD, WORD and BYTES accesses supported.
Data Buffers are typically 64 bytes long as this is the max normal packet size for most FS packets. For Isochronous
endpoints a maximum buffer size of 1023 bytes is supported. For other packet types the maximum size is 64 bytes per
buffer.
4.1.2.5.1. Layout
Addresses 0x0-0xff are used for control registers containing configuration data. The remaining space, addresses 0x100-
0xfff (3840 bytes) can be used for data buffers. The controller has control registers that start at address 0x10000.
The memory layout is different depending on if the controller is in Device or Host mode. In device mode, there are multiple
endpoints a host can access so there must be endpoint control and buffer control registers for each endpoint. In host
mode, the host software running on the processor is deciding which endpoints and which devices to access, so there only
needs to be one set of endpoint control and buffer control registers. As well as software driven transfers, the host
controller can poll up to 15 interrupt endpoints and has a register for each of these interrupt endpoints.
Table 387. DPSRAM
layout
Offset Device Function Host Function
0x0 Setup packet (8 bytes)
0x8 EP1 in control Interrupt endpoint control 1
0xc EP1 out control Spare
0x10 EP2 in control Interrupt endpoint control 2
0x14 EP2 out control Spare
0x18 EP3 in control Interrupt endpoint control 3
0x1c EP3 out control Spare
0x20 EP4 in control Interrupt endpoint control 4
0x24 EP4 out control Spare
0x28 EP5 in control Interrupt endpoint control 5
0x2c EP5 out control Spare
0x30 EP6 in control Interrupt endpoint control 6
0x34 EP6 out control Spare
0x38 EP7 in control Interrupt endpoint control 7
0x3c EP7 out control Spare
RP2040 Datasheet
4.1. USB 383