Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).
Hi, I developing the Mass Storage device at TMS 5509A! And I have the following problem.
I need to send/receive the large data amount (65536 bytes) through USB. But function
USB_postTransaction() if I use the linear buffet can send/receive only 65535 bytes, because the
parameter ByteCnt have type Uint16.
************************************************************************
USB_Boolean USB_postTransaction(USB_EpHandle hEp, Uint16 ByteCnt,void *Data, USB_FLAGS Flags);
************************************************************************
To resolve this problem I use linked lists. I devide my big buffer on two buffers and describe
it as linked lists:
************************************************************************
Uint16 Endpt2Buff[0x7F01];
Uint16 Endpt2Buff2[258];
USB_DataStruct Endpt2LinkBuff2 =
{
512,
(Uint16 *)&Endpt2Buff2,
NULL
};
USB_DataStruct Endpt2LinkBuff =
{
65024,
(Uint16 *)&Endpt2Buff,
&Endpt2LinkBuff2
};
************************************************************************
To sending/receiving I do following:
************************************************************************
//receiving
USB_postTransaction(&usbEpObjIn2, 0, &Endpt2LinkBuff, USB_IOFLAG_LNK | USB_IOFLAG_EOLL
| USB_IOFLAG_CAT);
//sending
USB_postTransaction(&usbEpObjOut2, 0, &Endpt2LinkBuff, USB_IOFLAG_LNK | USB_IOFLAG_CAT
| USB_IOFLAG_EOLL);
************************************************************************
This method I take from "TMS320C55x CSL USB Programmer’s Reference Guide"
(spru511.pdf), but there are some bugs. The next transaction after sending/receiving can not
take place. I'm trying set flag USB_IOFLAG_NOSHORT - it takes some results, but similar bugs
still take place.
Can anybody show the good example for sending/receiving large data amount? And in detail
explain what means flag "USB_IOFLAG_NOSHORT"?
Thank you!
P.S. Sorry my English is very poor :(!