RM0082
HS_USB 2.0 device
Doc ID 018672 Rev 1
485/844
is found to be corrupt at the end of the transfer, the descriptor is not updated and the next
clean packet overwrites the previous corrupted one. This conceals the USB error from the
application.
23.6.5 Burst
split
enable
When
burst split
is enabled, all AHB transfers (from the DMA to system memory and from
system memory to the TxFIFO) are splitted into bursts of a specified length.
The
burst split
is enabled by setting to 1‘b1 the BREN bit in the global CSRs’
. Moreover, the burst length value is programmed by setting the BRLEN
8 bit in the same device control register. As mentioned, this value indicates the number of 32
bit transfers that should happen in a single burst.
Note:
When thresholding and burst splitting are both enabled, the threshold length (THLEN)
should be either greater than multiples of burst length (BRLEN) or equal to BRLEN.
23.7
USB plug detect
The USB plug detect block (UPD) allows to detect when an USB host is either connected or
disconnected to the USB 2.0 device. This is done through the VBUS pad which is driven
high when the USB host is attached. In particular, a plug interrupt is raised by the UPD block
when the USB host is attached/detached. This interrupt is putted in OR with the output of
the Interrupt Manager block and the output of he OR logic goes to the VIC block.
Two 32 bit RW registers are associated to the UPD block, namely the plug status register
and the plug pending register, whose bit assignments are given in
respectively. These registers can be accessed at the base address 0xE1200000
As soon as the USB Host is connected to the device, the VBUS signal goes high enabling
the UPD internal counter, which generates an interrupt 10 ms after the connection. The
software routine handling the interrupt reads as 1‘b1 the intend field of the plug pending
register (
), and as 1‘b1 the state field of the plug status register (
): the
USB 2.0 PHY reset is then released (phy_rst set to 1‘b0 in plug status register) and the USB
2.0 PHY is placed in normal mode (phy_mode set to 1‘b0 in plug status register).
In contrast, when the USB host is detached, the VBUS signal goes low and after 10 ms an
interrupt is generated by the PD block (intpend field set to 1‘b1 in plug pending register).
Then, the interrupt handler reads as 1‘b0 the state field of the plug status register, so the
reset is asserted (phy_rst set to 1‘b1 in Plug Status register) and the USB 2.0 PHY is placed
in non-driving state (phy_mode set to 1‘b1 in plug status register).