Skip to content

Conversation

jfischer-no
Copy link
Contributor

Add initial documentation for CDC ACM function provided by the new USB device stack.

Add initial documentation for CDC ACM function provided by the new USB
device stack.

Signed-off-by: Johann Fischer <[email protected]>
Copy link

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.
Copy link
Contributor

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).

Comment on lines +82 to +96
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about #94748?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants