-
Notifications
You must be signed in to change notification settings - Fork 8k
doc: connectivity: usb: add initial CDC ACM documentation #96716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
doc: connectivity: usb: add initial CDC ACM documentation #96716
Conversation
Add initial documentation for CDC ACM function provided by the new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
2820d7e
to
c311d6b
Compare
|
and a compatible node in the devicetree sources is present. If necessary, CDC ACM | ||
support can be explicitly disabled by :kconfig:option:`CONFIG_USBD_CDC_ACM_CLASS`. | ||
The number of possible CDC ACM instances depends on the number of supported | ||
endpoints on the USB device controller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add something like:
Each CDC ACM instance requires three endpoints: two bulk (one IN, one OUT) and one interrupt IN (with Max Packet Size = 16).
Since the use case as a serial backend is very common and no configuration is | ||
necessary at runtime for the CDC ACM UART, the stack offers a helper that | ||
performs the steps described in :ref:`usb_device_next_howto_configure`. The | ||
helper is enabled by the :kconfig:option:`CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT` | ||
and initializes the USB device stack with a single CDC ACM instance. Sample | ||
:zephyr:code-sample:`usb-cdc-acm-console` demonstrates how to use it. | ||
|
||
:kconfig:option:`CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT` should also be used | ||
by the boards like :zephyr:board:`nrf52840dongle`, which do not have a debug | ||
adapter but a USB device controller, and wants to use CDC ACM UART as default | ||
serial backend for logging and shell. | ||
As the configuration would be identical for any board, there are common | ||
:zephyr_file:`devicetree file <boards/common/usb/cdc_acm_serial.dtsi>` and | ||
:zephyr_file:`Kconfig file <boards/common/usb/Kconfig.cdc_acm_serial.defconfig>` | ||
that must be included in the board's devicetree and Kconfig.defconfig files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about #94748?
Add initial documentation for CDC ACM function provided by the new USB device stack.