cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5x: USB ECM demo - how to setup host?

tjaekel
Lead

I am progressing on porting the CubeU5 project for STM32U575I-EV as Ux_Device_CDC_ECM to a NUCLEO-U575ZI-Q board:

The USB enumeration seems to work: I hear the sound and I see also an USB "STM32 CDC ECM" device.
BTW: very important to go with the right BSP files: the NUCLEO-U575ZI-Q has a different USPD chip! (I have changed to the right BSP files for NUCLEO, the EVAL board BSP cannot work).

What I get:

  • an "Other devices" in device manager (the driver is not found):

USB_ECM_1.png

No idea what to install on a Windows OS to make the device driver happy.
What works:

  • if I select manually and select "USB devices", "STMicroelectronics" and "STLink Bridge" - the driver is happy
  • but it cannot be right (it does not look like a network interface is added to the system)
  • trying some NDIS and RNDIS drivers fail (Windows complains about issues to install)

USB_ECM_2.png

The MCU FW is not happy:

  • it does not progress on DHCP server: the MCU does not get any IP address (and the event for IP address changed is not coming)

If I try on a MacOS:

  • it looks like I see a new ETH network interface: an "en4" is there when I have connected the MCU board (via USB and FW running as USB ECM, without MCU it is not there)
  • but the FW does not progress here in the same way: it does not get an IP address via DHCP
  • I tried to ping the reported IP address on "en4" - it does not work

There are some threads in Internet related to USB ECM: nothing mentioned for Windows OS, many application notes reference to use Linux (but no idea how to enable DHCP on such an USB EMC device, even it seems to be available (via ifconfig).

Does anybody have a clue how to install and use USB EMC?
(on Windows or MacOS)

What is missing so that MCU FW gets an IP address (via DHCP, as enabled in FW)?

How to install a driver on Windows?
And to make it working on Windows?

22 REPLIES 22

I am sorry for the type: yes, ECM
(how to edit old posts?)

BarryWhit
Lead II

(how to edit old posts?)

@tjaekel, click the little drop-down arrow located above the post's date/time and choose "edit reply".

 

BarryWhit_0-1723754650534.png

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.

 

For anyone coming here due to interest in ethernet/IP over USB, I'll note that TinyUSB has support for ECM, RNDIS, and recently added an NCM impl as well. Their maturity varies,  but at least there's active development around it.

Windows 11 ships with a microsoft driver for usb NCM devices.

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.