I am developing the USB of C5509. I have configured the USB using the CSL USB and then I have activate the USB module: USB_init(USB0, cfgArray, 0x80); USB_ConnectDev(USB0) What need I do when the PC send the RESET command? Could anyone help me with a sample code for managing USB C5509 module? Thanks in advance. Gianni |
|
USB problem
Started by ●July 4, 2003
Reply by ●July 7, 20032003-07-07
wrote: > I am developing the USB of C5509. > I have configured the USB using the CSL USB and then I have activate the USB module: > > USB_init(USB0, cfgArray, 0x80); > USB_ConnectDev(USB0) > > What need I do when the PC send the RESET command? > Could anyone help me with a sample code for managing USB C5509 module? // abort all transactions USB_abortAllTransaction(USB0); // reinit USB USB_init(USB0, cfgArray, 0x00); // and send ACK for reset USB_postTransaction (&endptObjIn, 0,NULL, USB_IOFLAG_NONE); Is what I do on RESET. Sample code for USB on C5509 is availeble from TI on request (EPIC, for example). Have fun, Indrek -- Indrek Rebane | Borthwick-Pignon Electronics Engineer | Tartu Science Park Phone: (+372) 7 302 641 | Riia 185, 51014 Tartu Fax: (+372) 7 383 041 | Estonia | www.bps.co.ee |
Reply by ●July 8, 20032003-07-08
Thank you for your answer. Now I receive the RESET command and then I receive the SETUP packet (GET_DESCRIPTOR). I reply: USB_postTransaction(&endptObjIn0, SIZEOF_DEVICE_DESCRIPTOR, &deviceDescriptor, USB_IOFLAG_NONE); but the host sends another RESET and then another SETUP packet. What is the problem? My descriptor is: BYTE deviceDescriptor[SIZEOF_DEVICE_DESCRIPTOR] = { SIZEOF_DEVICE_DESCRIPTOR, // Length of this descriptor (12h bytes) DESC_TYPE_DEVICE, // Type code of this descriptor (01h) 0x10,0x01, // Release of USB spec (Rev 1.1) 0x00, // Device's base class code - vendor specific HID 0x00, // Device's sub class code 0x00, // Device's protocol type code 0x40, // End point 0's max packet size = 64 0x51,0x04, // Vendor ID for device, TI=0x0451 0x01,0x90, // Product ID for device, 0x9001 0x00,0x01, // Revision level of device, Rev=1.0 0, // Index of manufacturer name string desc 0, // Index of product name string desc 0, // Index of serial number string desc 1 // Number of configurations supported }; I sent an e-mail to TI but they haven't reply... Do you have a copy of the sample code? Thanks, Gianni ----- Original Message ----- From: Indrek Rebane To: Sent: Monday, July 07, 2003 11:43 AM Subject: Re: [c55x] USB problem wrote: > I am developing the USB of C5509. > I have configured the USB using the CSL USB and then I have activate the USB module: > > USB_init(USB0, cfgArray, 0x80); > USB_ConnectDev(USB0) > > What need I do when the PC send the RESET command? > Could anyone help me with a sample code for managing USB C5509 module? // abort all transactions USB_abortAllTransaction(USB0); // reinit USB USB_init(USB0, cfgArray, 0x00); // and send ACK for reset USB_postTransaction (&endptObjIn, 0,NULL, USB_IOFLAG_NONE); Is what I do on RESET. Sample code for USB on C5509 is availeble from TI on request (EPIC, for example). Have fun, Indrek -- Indrek Rebane | Borthwick-Pignon Electronics Engineer | Tartu Science Park Phone: (+372) 7 302 641 | Riia 185, 51014 Tartu Fax: (+372) 7 383 041 | Estonia | www.bps.co.ee |
|
Reply by ●September 16, 20032003-09-16
Hi, I am exactly in a similar situation. After sending the device description follows reset and new device descriptor request. Anyone have some example code for C5509 USB or solution for this problem? Thanks, Mikko --- In , <tech@v...> wrote: > Thank you for your answer. > Now I receive the RESET command and then I receive the SETUP packet (GET_DESCRIPTOR). > I reply: > > USB_postTransaction(&endptObjIn0, SIZEOF_DEVICE_DESCRIPTOR, > &deviceDescriptor, USB_IOFLAG_NONE); > > but the host sends another RESET and then another SETUP packet. What is the problem? > > My descriptor is: > > BYTE deviceDescriptor[SIZEOF_DEVICE_DESCRIPTOR] = { > SIZEOF_DEVICE_DESCRIPTOR, // Length of this descriptor (12h bytes) > DESC_TYPE_DEVICE, // Type code of this descriptor (01h) > 0x10,0x01, // Release of USB spec (Rev 1.1) > 0x00, // Device's base class code - vendor specific HID > 0x00, // Device's sub class code > 0x00, // Device's protocol type code > 0x40, // End point 0's max packet size = 64 > 0x51,0x04, // Vendor ID for device, TI=0x0451 > 0x01,0x90, // Product ID for device, 0x9001 > 0x00,0x01, // Revision level of device, Rev=1.0 > 0, // Index of manufacturer name string desc > 0, // Index of product name string desc > 0, // Index of serial number string desc > 1 // Number of configurations supported > }; > > I sent an e-mail to TI but they haven't reply... > Do you have a copy of the sample code? > > Thanks, > Gianni > ----- Original Message ----- > From: Indrek Rebane > To: > Sent: Monday, July 07, 2003 11:43 AM > Subject: Re: [c55x] USB problem > tech@v... wrote: > > I am developing the USB of C5509. > > I have configured the USB using the CSL USB and then I have activate the USB module: > > > > USB_init(USB0, cfgArray, 0x80); > > USB_ConnectDev(USB0) > > > > What need I do when the PC send the RESET command? > > Could anyone help me with a sample code for managing USB C5509 module? > > // abort all transactions > USB_abortAllTransaction(USB0); > // reinit USB > USB_init(USB0, cfgArray, 0x00); > // and send ACK for reset > USB_postTransaction > (&endptObjIn, 0,NULL, USB_IOFLAG_NONE); > > Is what I do on RESET. > > Sample code for USB on C5509 is availeble from > TI on request (EPIC, for example). > > Have fun, > Indrek > -- > Indrek Rebane | Borthwick-Pignon > Electronics Engineer | Tartu Science Park > Phone: (+372) 7 302 641 | Riia 185, 51014 Tartu > Fax: (+372) 7 383 041 | Estonia > indrek@b... | www.bps.co.ee |
Reply by ●January 7, 20052005-01-07