You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/05 16:59:15 UTC

[GitHub] [incubator-nuttx] v01d opened a new issue #3389: USB CDC/ACM HOST CLASS DRIVER

v01d opened a new issue #3389:
URL: https://github.com/apache/incubator-nuttx/issues/3389


   ```
     Description: A CDC/ACM host class driver has been added.  This has been
                  testing by running the USB CDC/ACM host on an Olimex
                  LPC1766STK and using the
                  boards/arm/stm32/stm3210e-eval/configs/usbserial
                  configuration (using the CDC/ACM device side driver).  There
                  are several unresolved issues that prevent the host driver
                  from being usable:
   
                 - The driver works fine when configured for reduced or bulk-
                   only protocol on the Olimex LPC1766STK.
   
                 - Testing has not been performed with the interrupt IN channel
                   enabled (ie., I have not enabled FLOW control nor do I have
                   a test case that used the interrupt IN channel).  I can see
                   that the polling for interrupt IN data is occurring
                   initially.
   
                 - I test for incoming data by doing 'nsh> cat /dev/ttyACM0' on
                   the Olimex LPC1766STK host.  The bulk data reception still
                   works okay whether or not the interrupt IN channel is enabled.
                   If the interrupt IN channel is enabled, then polling of that
                   channel appears to stop when the bulk in channel becomes
                   active.
   
                 - The RX reception logic uses the low priority work queue.
                   However, that logic never returns and so blocks other use of
                   the work queue thread.  This is probably okay but means that
                   the RX reception logic probably should be moved to its own
                   dedicated thread.
   
                 - I get crashes when I run with the STM32 OTGHS host driver.
                   Apparently the host driver is trashing memory on receipt
                   of data.
   
                   UPDATE:  This behavior needs to be retested with:
                     commit ce2845c5c3c257d081f624857949a6afd4a4668a
                     Author: Janne Rosberg <ja...@offcode.fi>
                     Date:   Tue Mar 7 06:58:32 2017 -0600
   
                       usbhost_cdcacm: fix tx outbuffer overflow and remove now
                       invalid assert
   
                     commit 3331e9c49aaaa6dcc3aefa6a9e2c80422ffedcd3
                     Author: Janne Rosberg <ja...@offcode.fi>
                     Date:   Tue Mar 7 06:57:06 2017 -0600
   
                       STM32 OTGHS host:  stm32_in_transfer() fails and returns NAK
                       if a short transfer is received.  This causes problems from
                       class drivers like CDC/ACM where short packets are expected.
                       In those protocols, any transfer may be terminated by sending
                       short or NUL packet.
   
                     commit 0631c1aafa76dbaa41b4c37e18db98be47b60481
                     Author: Gregory Nutt <gn...@nuttx.org>
                     Date:   Tue Mar 7 07:17:24 2017 -0600
   
                       STM32 OTGFS, STM32 L4 and F7: Adapt Janne Rosberg's patch to
                       STM32 OTGHS host to OTGFS host, and to similar implements for
                       L4 and F7.
   
                 - The SAMA5D EHCI and the LPC31 EHCI drivers both take semaphores
                   in the cancel method.  The current CDC/ACM class driver calls
                   the cancel() method from an interrupt handler.  This will
                   cause a crash.  Those EHCI drivers should be redesigned to
                   permit cancellation from the interrupt level.
   
                  Most of these problems are unique to the Olimex LPC1766STK
                  DCD; some are probably design problems in the CDC/ACM host
                  driver.  The bottom line is that the host CDC/ACM driver is
                  still immature and you could experience issues in some
                  configurations if you use it.
   
                  That all being said, I know of no issues with the current
                  CDC/ACM driver on the Olimex LPC1766STK platform if the interrupt
                  IN endpoint is not used, i.e., in "reduced" mode.  The only loss
                  of functionality is output flow control.
   
                  UPDATE: The CDC/ACM class driver may also now be functional on
                  the STM32.  That needs to be verified.
   
     Status:      Open
     Priority:    Medium-Low unless you really need host CDC/ACM support.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org