2010-03-12 03:18 AM
USB-FS device lib Virtual COM Port problem
2011-05-17 04:43 AM
Hi All
after some investigation, the problem was in the Get_SerialNum function. For some reason, the chipID is 0xFFFFFFFF on all the 3 Serial0...Serial2. I commented out this part and edited directly the Virtual_Com_Port_StringVendor, Virtual_Com_Port_StringProduct and Virtual_Com_Port_StringSerial, giving the fixed but meaningful values. Now the example works ! However... going back to my project.. I did the same thing but this time windows says that the USB device is not recognized. The big difference with the given example is that after calling Set_USBClock(); USB_Interrupts_Config(); USB_Init(); my fw starts doing many other things (the Keil RT kernel starts and task are launched).Could this be a timing problem ?
What else ? Thanks in advance2011-05-17 04:43 AM
Hi,
one of the changes that I made to adapt the sample to my project was to increase VIRTUAL_COM_PORT_DATA_SIZE from 64 to a higher value. Knowing nothing about USB, I also changed the last field of the DEVICE_PROP Device_Property (/*MAX PACKET SIZE*/) from 0x40 to the same higher value. That was a mistake, apparently. After setting back this field to 0x40 the device is correctly recognized by windows. Thanks to everybody who helped :) Now the question is: is it a problem to have the VIRTUAL_COM_PORT_DATA_SIZE and usb MAX PACKET SIZE set to differet values ?