My TMS320C6748 target is a USB device (mass storage device class). I am using the following software packages:
- XDC Tools 3.25.6.96
- SYS/BIOS 06.37.3.30 (includes FatFS R0.08a)
- C6748 PDK 2.00.00.00 (includes BIOSPSP 3.00.01.00 and NSP 1.10.00.03)
- EDMA 02.11.14.18
- DSPLIB 3.4.0.0
- MATHLIB 3.1.0.0
- C6000 Code Generation Tools (CGT) 7.4.21
- C6748 StarterWare 1.20.04.01
- SATA driver and Block Media driver from BIOSPSP 1.30.00.05
We are using Code Composer Studio 7.1.0.00016.
The USB device descriptors returned to the host via the control endpoint appear as follows:
Device Descriptor:
bcdUSB: 0x200 (2.0)
bDeviceClass: 0 (DEVICE)
bDeviceSubClass: 0
bDeviceProtocol: 0
bMaxPacketSize0: 64 (applies to control endpoint only)
idVendor: 0x1CBE (Luminary Micro Inc.)
idProduct: 0x05
bcdDevice: 0x0100
iManufacturer: 1
iProduct: 2
iSerialNumber: 3
bNumConfigurations: 1
Configuration Descriptor:
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 0xC0 (self-powered, no remote-wakeup)
bMaxPower: 250 (500mA)
Interface Descriptor:
bInterfaceNumber: 0
bNumEndpoints: 2
bInterfaceClass: 0x08 - mass storage
bInterfaceSubClass: 0x06 - SCSI transparent command set
bInterfaceProtocol: 0x50 - BBB (USB Mass Storage Class Bulk-Only Transport)
Bulk In/Out Endpoints
Out:
bDescriptorType: 0x05 (Endpoint)
bEndpointAddress: 0x01 (OUT)
bmAttributes: 0x02 (Bulk transfer)
wMaxPacketSize: 512
bInterval: 0
In:
bDescriptorType: 0x05 (Endpoint)
bEndpointAddress: 0x81 (IN)
bmAttributes: 0x02 (Bulk transfer)
wMaxPacketSize: 512
bInterval: 0
The problem we are seeing is that when transferring a large file (e.g. 1.8GB) from our host to our target device (in this case, our host is an Ubuntu Linux 16.04 desktop), after about 1.5GB the transfer stops due our target device returning a NAK response to the host's PING transaction. This continues indefinitely. The normal transaction sequence seen during the data phase when the host issues a SCSI Write (10) command is:
OUT PID to device endoint 1
DATA0/1 PID w/ 512 bytes
NYET PID from device
Sequence of PING PIDs to device endpoint 1 eliciting NAK responses PID from device (e.g. ~45 iterations of this)
PING PID to device endpoint 1 eliciting ACK response PID from device
Start again with OUT PID and repeat.
When the transfer stops, after the NYET PID from the device is returned (just like above), the sequence of PING PIDs elicits NAKs indefinitely (i.e. we don't see ACK after ~45 iterations, but only NAK in response to PINGs from the host), indicating that the device is not ready to receive data.
I'm concerned about several items.
1. Our target DSP TMS320C6748 is interrupting the application for every USB SOF (start-of-frame), which is 8000 times/second. Can I disable this interrupt? If so, what register (e.g. USB0 INTSRCR register)?
2. I see conflicting information regarding what the bulk out endpoint's bInterval value should be set to. It's currently 0. I have read it should be set to the max NAK rate of the endpoint (with respect to # of microframes).
Thank you for any assistance.