2007-04-24 06:10 AM
2007-04-19 08:58 AM
I seem to be having and issue with the Device struct not being populated
and getting stuck in a NOP condition. I am currently using the Virtual Com Port example from ST When the USB cable is plugged in Windows does not recognize the device and does not recognoze the device driver provided for windows. I really could use some advice on where to go forward. I am currently compiling under the Green Hills enviroment with the a Hitex Board with a STR710 chip here is the snipet of code void Virtual_Com_Port_init(void) { pInformation->Current_Configuration = 0; /* Connect the device */ PowerOn(); /* USB interrupts initialization */ _SetISTR(0); /* clear pending interrupts */ wInterrupt_Mask = IMR_MSK; _SetCNTR(wInterrupt_Mask); /* set interrupts mask */ pInformation->Current_Feature = Virtual_Com_Port_ConfigDescriptor[7]; /* Wait until device is configured */ UART0_Config_Default(); while (pInformation->Current_Configuration == 0) NOP_Process(); bDeviceState = CONFIGURED; } Thanks :-] Argonaut2007-04-22 07:13 AM
Hi Argonaut,
it seems you have a problem in the initilisation of your virtual com port application. Try to disconnect then connect your USB connector, if not may be your clocks ( USB at 48 MHz and Main CPU/ APBs) are not configured in the right way. I haven't a Hitex Board, is it possible to attach its schematics ? Rave :-Z2007-04-24 06:10 AM
Ok I have discovered why I cannot load the Windows Drivers, in the Virtual Com Port demo I notice that it does not pass up the PID and Vendor ID , windows recognizes those values to load the driver, those values are listed under
/* USB Standard Device Descriptor */ const u8 Virtual_Com_Port_DeviceDescriptor[] = { 0x12, /* bLength */ USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */ 0x00, 0x02, /* bcdUSB = 2.00 */ 0x02, /* bDeviceClass: CDC */ 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ 0x40, /* bMaxPacketSize0 */ 0x83, 0x04, /* idVendor = 0x0483 */ 0x40, 0x57, /* idProduct = 0x7540 */ 0x00, 0x01, /* bcdDevice = 1.00 */ 1, /* Index of string descriptor describing manufacturer */ 2, /* Index of string descriptor describing product */ 3, /* Index of string descriptor describing the device's serial number */ 0x01 /* bNumConfigurations */ }; Did i miss something in the init that should send these values to Windows??? :-?