Hi,
I use a modified version of Keil's USB CDC-ACM function class implementation. It works really well but I am having a problem in the way I am using it. I use the virtual COM-port to connect as a modem to the host PC. My target connects through PPP to the USB CDC-ACM input/output. This allows me to create multiple sockets for multi-channel TCP/IP communication. This creates the problem! With increasing communication throughput my application showes signs of instability. I am looking for a way how I could limit the data throughput at the USB device level. Could someone provide me with an feasable example of how to achieve this? I appreciate your help - thank you!
-Frank
"but never succeeded in reading FE bit status"
I mistakenly use WrCmd() in above posts. It is replaced to RdCmdDat() as follows.
a) bulk OUT EP - Check the FE bit of "Select Endpoint" command, if the EP buffer is empty, return - - WrCmd( CMD_SEL_EP(EPAdr(CDC_DEP_OUT)) ); if ( CMD_DATA & EP_SEL_F == 0 ) return; // - wrong
if ( RdCmdDat( CMD_SEL_EP(EPAdr(CDC_DEP_OUT)) ) & EP_SEL_F == 0 ) return;
b) bulk IN EP - Check the FE bit of "Select Endpoint" command, if no empty EP buffer, return - - WrCmd( CMD_SEL_EP(EPAdr(EPNum)) ); if ( CMD_DATA & EP_SEL_F != 0 ) return; // - wrong
if ( RdCmdDat( CMD_SEL_EP(EPAdr(CDC_DEP_IN)) ) & EP_SEL_F != 0 ) return;
Tsuneo
Hi Tsuneo,
thank you for your example.
- Frank
you look like very skilled person in discussed area. I have found a different post (probably older and thus closed already - I can't reply there):
http://www.keil.com/forum/docs/thread12298.asp
It's regarding the composite virtual COM ports under M$ (related to usbser.sys). I'm trying to start uderstanding the CDC/ACM and would like to bring up more VCOMs on one device (LPC2368) with one (default, non-vendor specific) driver. You wrote you was testing it via IAD and/or multiple CDCs.
Do you have any results from this? Is there any resource/example you could point me to or provide to speed up my understanding in this area?
Thanks.
Regards Pavel