PKP
VS1000 P
ROGRAMMER
’
S
G
UIDE
VSMPG
20.2.6
USB_EP_SENDn - EPnIN Transmittable Packet Info 0xC088..0xC08B
USB_EP_SENDn bits
Name
Bits
Description
txpkt-ready
15
Packet ready for transmission
start-addr
13:10
Starting location of packet
length
9:0
Length of packet in bytes (0..1023)
When the DSP has written a packet into the transmit buffer, that is ready to be trans-
mitted to the PC by an endpoint, the DSP signals the USB firmware by setting the
value of the USB_EP_SENDn register of the endpoint that should transmit the packet
(USB_EP_SEND0 for endpoint 0, USB_EP_SEND1 for endpoint 1 etc).
The txpkt-ready bit should be set to “1” by the DSP. When the packet information (not
contents) is loaded to the internal Transmit Holding Register of the endpoint, txpkt-ready
bit is set to “0” by the hardware. Note that this does not indicate that the packet is sent
to the PC, merely that it is ready for sending when the PC next requests “IN” data for
that endpoint. Scanning the txpkt-ready bit merely allows software to prepare the next
packet to be sent even before the previous packet has been sent to the PC.
The start-addr field is index to a 64-word boundary in the transmit buffer memory area.
The actual memory location that start-addr corresponds to is calculated by:
packet start address = USB_SE (start-addr
×
64)
which in VS1000 corresponds to address X:0x3000 for start-addr=0, X:0x3040 for start-
addr=1 etc.
20.2.7
USB_EP_STn - Endpoint flags EPnIN and EP0nUT 0xC090..0xC093
USB_EP_STn bits
Name
Bits
Description
EPnOUT (PC
→
Device) endpoint (0 .. 3) flags
out-type
15:14
00=bulk 01=interrupt 11=isochronous
out-enable
14:13
1=enabled 0=disabled
out-forcestall
12
Force STALL
out-stall-sent
11
At least 1 STALL sent
reserved
10:8
Set to 0
EPnIN (Device
→
PC) endpoint (0 .. 3) flags
in-type
7:6
00=bulk 01=interrupt 11=isochronous
in-enable
5
1=enabled 0=disabled
in-forcestall
4
Force STALL
in-stall-sent
3
At least 1 STALL sent to PC
in-nak-sent
2
At least 1 NAK sent to PC
in-xmit-empty
1
Transmitter empty
reserved
0
Set to 0
Rev. 0.20
2011-10-04
Page