Dear all, Thanks a lot for every consecutive help i get from this forum and a special thanks to Tsuneo.
I downloaded VCOM example program from keil but that doesn't fits to my requirement.
The code doesn't work if I transmit the data as soon as i receive the IN interrupt.
I want to transmit 64bytes in 1 ms. i tried changing the usbdesc.c but it doesn't transmits the data at this rate and makes the PC to go hang.
My minimum requirement is to tranmsit 30KBytes/sec.
I highly appreciate your help.
Hi Tsuneo, Thanks for the reply and that very useful information. I am getting a weird problem. Now i have made the max packet size as 32 and IN token time as 8 ms. I am using two VCOM ports.
Have made few changes in the code.
void USB_EndPoint2 (DWORD event) { switch (event) { case USB_EVT_IN: USB_WriteEP(0x82, A_TxData0_U8R, 32);
In usbDesc.c i have changed the time to 8 ms, USB_MAX_PACKET0 as 34, WBVAL(0x20),/* wMaxPacketSize */.
My firmware always transfers an array A_TxData0_U8R of size 32 byte.
Even with this simple code the PC comes to hang. I am not able to troubleshoot it.
It would be even fine if I can transfer 32Bytes in 1 ms from 1 VCOM port.
Another interesting thing is if I set a flag in the void USB_EndPoint2 (DWORD event) function, check that in main(), and transfer the data after 4 ms, it works. But according to my design constrains i cannot go with this implementation.
Please guide me how i can overcome this problem. If you can give some coding help also, it would be very great.
Thanks! Kamal