This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C5515 CSL USB HS 1kB packet size

Hi.

I'm using the C5515 ezdsp kit and have managed to set up DSP-USB comm in both directions using the USB-DMA CSL example. I've seen that by default packet sizes are set to 64 bytes, even for HS bulk endpoints. I've set them to 512 bytes and can achieve a bulk transfer rate of about 170 Mbit/s which is not ideal but much more than I need.

However, for practical reasons I'd like to use HS interrupt endpoints with 1024 bytes packet size. When I set those, I get an "endpoint init failed"! Could you tell me why this is? Are 1024 bytes packets on interrupt endpoints not supported on this DSP/USB controller? Or did I forget to adjust some memory setting somewhere?

Of course, I've set the endpoint descriptors correctly (controlled by USBlyzer for packet sizes up to 512bytes):

Uint16 cfgDesc[40] = {

// ...
// interrupt endpoints with wMaxPacketSize=0x0200 and bInterval=0x01
// EPdesc bLength bmAttr eAddr wMaxPsize[1:0] bInterval
0x0507, 0x0381, 0x0200, 0x0701,            //endpoint 1 IN descriptor
// eAddr EPdesc wMaxPsize[0] bmAttr bInterval wMaxPsize[1]
0x0105, 0x0003, 0x0102,                     //endpoint 1 OUT descriptor
0x0507, 0x0382, 0x0200, 0x0701,            //endpoint 2 IN descriptor
0x0205, 0x0003, 0x0102,                     //endpoint 2 OUT descriptor
0x0507, 0x0383, 0x0200, 0x0701,             //endpoint 3 IN descriptor
0x0305, 0x0003, 0x0102,                    //endpoint 3 OUT descriptor
0x0507, 0x0384, 0x0200, 0x0701,             //endpoint 4 IN descriptor
0x0405, 0x0003, 0x0102                        //endpoint 4 OUT descriptor
};

And I've also changed all CS_USB_BULKs to CS_USB_INTRs and packet size constants to 0x0400 in CSL calls.

So what am I doing wrong? Thank you very much for your help.

Andreas

  • Hi Andreas,

    You did everything correctly. It is the CSL implementation clitch which reject your proper request by mistake. In USB_initEndptObj (csl.usb.c), line 534, it assumes that any HS EP other than ISO should not exceed 512 byte. I checked the USB 2.0 spec. You are correct. For Interrupt EP, you can have up to 1024 byte maximum packet size. We will correct this mistake in our next CSL release. Meanwhile, you can make your own code change accordingly, or use 512 instead.

     

    Best regards,

    Ming

  • Hi Ming,

    Thank you for your answer. It's okay like that, no problem, at least I'm sure that I've not missed anything. I'll simply use 512 byte max packet size.

    Best regards,

    Andreas