This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB CDC-ACM function class

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

Parents
  • "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

Reply
  • "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

Children