Hello,
I've some problems with the USB2.0.
I'm using a LOGIC PD L138 eXperimenter board with the following versions
on the ARM side of the OMAP-L138:
- CCS Version 4.2.1.00004 (with GEL files for the eXperimenter board)
- SYS/BIOS 6.30.03.46
Implemented is a virtual COM port (usbser.sys) on my Laptop (Windows XP Professional, SP3).
The two bmAttributes for the endpoint descriptors (EP1 IN and EP1 OUT) within the configuration descriptor are set to "Bulk".
Enumeration for high speed is OK.
When sending one message from the Laptop to the OMAPL138 for the first time, I got the correct answer.
When I now resend the exact same message, the OMAPL138 receives this message correct, however on the Tx side of the OMAPL138 I got the UNDERRUN and FIFONOTEMPTY errors.
The flow and OMAPL138 register setting is as follows:
Send 10 bytes from Laptop to OMAPL138 (via LabVIEW):
INTMASKEDR = 0x00000200 (EP1 Rx Interrupt)
Set INDEX to 1
RXCSR = 0x00000001 (RXPKTRDY)
RXCOUNT = 0x0000000A (10 bytes received as expected)
Read 10 bytes from FIFO1 (read the correct bytes)
Clear RXPKTRDY (RXCSR &= ~USB20_PERI_RXCSR_RXPKTRDY)
Send back 8 bytes from OMAPL138 to Laptop:
Set INDEX to 1
TXCSR = 0x00002004 (MODE Tx / UNDERRUN ?????)
Clear UNDERRUN (TXCSR &= ~USB20_PERI_TXCSR_UNDERRUN)
Write 8 bytes to FIFO1
Set TxPktRdy (TXCSR |= USB20_PERI_TXCSR_TXPKTRDY)
All 8 bytes are correct receive by the Laptop (LabVIEW)
INTMASKEDR =0x00000002 (EP1 Tx Interrupt)
Set INDEX to 1
TXCSR = 0x00002004 (MODE Tx / UNDERRUN ?????)
Clear UNDERRUN (TXCSR &= ~USB20_PERI_TXCSR_UNDERRUN)
Post semaphore that Tx is over
Send same 10 bytes as above from Laptop to OMAPL138 (via LabVIEW):
INTMASKEDR = 0x00000200 (EP1 Rx Interrupt)
Set INDEX to 1
RXCSR = 0x00000001 (RXPKTRDY)
RXCOUNT = 0x0000000A (10 bytes received as expected)
Read 10 bytes from FIFO1 (read the correct bytes)
Clear RXPKTRDY (RXCSR &= ~USB20_PERI_RXCSR_RXPKTRDY)
Set INDEX to 1
TXCSR = 0x00002000 (MODE Tx)
Write 8 bytes to FIFO1
Set TxPktRdy (TXCSR |= USB20_PERI_TXCSR_TXPKTRDY)
Nothing received by the Laptop (LabVIEW)!!!
INTMASKEDR =0x00000002 (EP1 Tx Interrupt)
Set INDEX to 1
TXCSR = 0x00002002 (MODE Tx / FIFONOTEMPTY ?????)
======================================================
After an USB reset from Host, the FIFOs are set to the following values:
INDEX (0x01E0040E) = 1
RXFIFOSZ (0x01E00463) = 0x16 (double buffering: 1024 bytes)
TXFIFOSZ (0x01E00462) = 0x16 (double buffering: 1024 bytes)
RXFIFOADDR (0x01E00466) = 0x0008 (start addr. 64)
TXFIFOADDR (0x01E00464) = 0x0088 (start addr. 1088, i.e. 1024 + 64)
RXMAXP (0x01E00414) = 0x0200 (512 byte max payload)
TXMAP (0x01E00410) = 0x0200 (512 byte max payload)
======================================================
I can see the UNDERRUN / FIFONOTEMPTY when using hyperterm.
I also tried to use two different endpoints (EP1 IN / EP2 OUT), no success.
Has anybody an idea what could be wrong?
Thanks,
Frank