Add USB CDC-ECM Host support#18815
Conversation
|
Wow, very cool, thank you @dlizewski, and congratulations on your first contribution to the NuttX RTOS :-) Could you please provide also a documentation for the new functionality? :-) Pozdrawiam :-) |
|
Builds fine for me, but I have no board to test, tried on NUCLEO-H755ZI but I had problem flashing :-P |
cederom
left a comment
There was a problem hiding this comment.
Thank you @dlizewski :-)
Please add documentation in a free moment :-)
38866d8 to
40ea04c
Compare
Added docs for the new config and for CDC-ECM host driver |
|
@xiaoxiang781216 @cederom PTAL |
5f6656f to
46a966e
Compare
|
The pipeline is failing on weact-stm32h750:nsh But I checked master and that configuration also fails to build on master |
@dlizewski yes, I just tested locally and found the guilt: the author submitted the defconfig with CONFIG_DEBUG_NOOPT=y. I will submit a fix. |
|
Please Rebase your PR with the Master Branch, we just fixed weact-stm32h750 thanks :-) |
Added support for selecting a different USB configuration. Certain USB devices offer different classes using different configurations. This allows a board file to provide a callback to select the proper configuration for a given USB device. Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Added support for USB host to use an USB CDC-ECM device. This class is used for usb-ethernet adapters as well as many modems. Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Converted USB Host CDC-ECM to a lower half driver. Removed existing full network driver callbacks and replaced with lower half. Signed-off-by: daniellizewski <daniellizewski@geotab.com>
The host interrupt callback was incorrectly using the wrong IRQ for disconnected. In host mode the same IRQ is used for connect/disconnected and it must check a status bit to know which one. When a USB device was unplugged, the host channels were free'd, but if they happen to be mid-transfer, that transfer was never cancelled so the USB hardware might still be trying to perfrom a transfer after was free'd. Fixed by cancelling any transfers on free. Signed-off-by: daniellizewski <daniellizewski@geotab.com>
46a966e to
1470dce
Compare
Rebased and now the pipeline passes, thanks! |
cederom
left a comment
There was a problem hiding this comment.
Thank you @dlizewski amazing work! :-)
Summary
nucleo-h563zi:nshusbnet.Impact
Testing
nucleo-h563zi:nshusbnetconfiguration and connected the USB-Ethernet adaptor nucleo-h563zi:nshusbnet (A Realtek RTL8153 Gigabit Ethernet Adaptor with integrated hub). I then enabled the interface, set DHCP, verified it got an IP, then pinged 8.8.8.8 with no packet loss.Commands run:
ecm_log.txt