Skip to content

sys/usbus: usbus_cdc_ecm does not work together with usbus_cdc_acm for STM32 #19359

@gschorcht

Description

@gschorcht

Description

The combination of USBUS CDC ECM and CDC ACM interface does not work for different STM32 MCUs. It doesn't work for:

  • STM32F429ZI FS interface (CID 1100)
  • STM32F439ZI FS interface (CID 1200)
  • STM32F723IE HS interface (CID 3100)
  • STM32F746NG HS interface (CID 2100)

For these MCUs, the enumeration of the CDC ECM interface fails:

[224862.292833] usb 1-2.2: Product: nucleo-f439zi
[224862.292835] usb 1-2.2: Manufacturer: RIOT-os.org
[224862.292836] usb 1-2.2: SerialNumber: DC4DB8B40086FC7A
[224862.305285] cdc_acm 1-2.2:1.0: ttyACM1: USB ACM device
[224867.487946] cdc_ether: probe of 1-2.2:1.2 failed with error -22
...
[225333.844310] usb 1-4.1: Product: stm32f723e-disco
[225333.844311] usb 1-4.1: Manufacturer: RIOT-os.org
[225333.844313] usb 1-4.1: SerialNumber: A6BAC4E1B1E0806B
[225333.847348] cdc_acm 1-4.1:1.0: ttyACM1: USB ACM device
[225339.028774] cdc_ether: probe of 1-4.1:1.2 failed with error -32

It works for:

  • STM32F723IE FS interface (CID 3000)
  • STM32F746NG FS interface (CID 2000)
  • STM32F767ZI FS interface (CID 2000)

For the FS interfaces it could be related to the 1.x Core version while the problem for the HS interfaces could be HS interface driver. tests/usbus_cdc_ecm works for all MCUs (for the HS interface PR #19358 is required).

The problem was already given before the cpu/stm32/periph/usbdev_otg.c was moved as modified version to drivers/usbdev_synopsys_dwc2 (see branch 2022.07).

Steps to reproduce the issue

  1. Checkout PR sys/usbus/cdc/ecm: fix High-Speed mode #19358
  2. Use any of the following commands
     USEMODULE=stdio_cdc_acm BOARD=stm32f429i-disc1 make -j8 -C tests/usbus_cdc_ecm flash
     USEMODULE=stdio_cdc_acm BOARD=nucleo-f439zi make -j8 -C tests/usbus_cdc_ecm flash
     USEMODULE='periph_usbdev_hs_ulpi stdio_cdc_acm' BOARD=stm32f746g-disco make -j8 -C tests/usbus_cdc_ecm/ flash
     USEMODULE='periph_usbdev_hs_utmi stdio_cdc_acm' BOARD=stm32f723e-disco make -j8 -C tests/usbus_cdc_ecm flash
    

Expected results

Actual results

Versions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions