2024-01-22 10:33 PM - last edited on 2024-01-30 03:44 AM by SofLit
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:
No idea what to install on a Windows OS to make the device driver happy.
What works:
The MCU FW is not happy:
If I try on a MacOS:
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?
Solved! Go to Solution.
2024-01-24 03:48 PM
Now all works!
Dear STM team: please, could you develop/provide a Windows USB EMC driver?
(or cooperate with other companies: Seeger, MCCI, NVidia seem to have such one).
Issue with SD Card solved:
The flying wires were causing the issue to open the web files. With a carrier board where SD Card adapter is connected - all works fine. BTW: I tried to lower SDMMC speed, clock dividers - nothing helped really, except to make the connection "directly" for SD Card adapter (I got CRC errors on SDMMC transactions).
So, all works fine (on my Android phone). Just Windows OS "sucks" (missing driver).
What could "we" do with it?:
How to solve the issue with missing USB ECM driver on Windows?:
So far, all accomplished what I had in mind.
Well done, STM team, to have such a USB ECM (with the new AZURE RTOS and USB stack),
which works now on NUCLEO-U575ZI-Q board as well.
I will cleanup my project and publish on (my) GitHub...
2024-01-23 10:05 PM
Another progress: I can see my NUCLEO-U575ZI-Q board on an Android phone! Cool.
What I have figured out on Internet:
But USB EMC works fine on Linux, e.g. MacOS, Ubuntu Linux (not tried) but for sure on Android!
So, I could enable "Ethernet tethering" on my Android phone:
Just: my SD Card interface or the SD Card seems to have a problem: the file system, to initialize and to open the request files (e.g. "index.html") does not work.
But the USB EMC is working! Cool
When I connect via USB-C to Android phone, enable "Ethernet tethering" - the MCU progresses, gets an IP address (via DHCP server) - cool.
I can also "ping" the MCU, via the IP address on UART log (ping tool on Android phone, I cannot reach MCU from PC: a different network, potentially a "route" setting needed, with a gateway to reach the other network)
So,
USB EMC works (just on Linux systems, I saw it popping up also on MacOS), just to fix my SD Card:
It looks like the NetX file system cannot be initialized successfully: no idea in which format the SD Card has to be (exFAT, FAT32, FAT16, NTFS, ...). MCU cannot open files. (but so far good to see USB EMC working).
(but looks now more like a minor issue).
Why do I "like" Windows so much? Because it is a live-long challenge to fix issues... LOL
2024-01-24 03:48 PM
Now all works!
Dear STM team: please, could you develop/provide a Windows USB EMC driver?
(or cooperate with other companies: Seeger, MCCI, NVidia seem to have such one).
Issue with SD Card solved:
The flying wires were causing the issue to open the web files. With a carrier board where SD Card adapter is connected - all works fine. BTW: I tried to lower SDMMC speed, clock dividers - nothing helped really, except to make the connection "directly" for SD Card adapter (I got CRC errors on SDMMC transactions).
So, all works fine (on my Android phone). Just Windows OS "sucks" (missing driver).
What could "we" do with it?:
How to solve the issue with missing USB ECM driver on Windows?:
So far, all accomplished what I had in mind.
Well done, STM team, to have such a USB ECM (with the new AZURE RTOS and USB stack),
which works now on NUCLEO-U575ZI-Q board as well.
I will cleanup my project and publish on (my) GitHub...
2024-01-24 08:15 PM
Sorry,
Dear STM team: please provide an USB ECM driver for Windows OS.
Or ask Microsoft: why their AZURE RTOS does support USB ECM - but not their host (Windows)?
Thank you.
2024-01-26 05:42 PM
My project for "USB_ECM" on a NUCLEO-U575ZI-Q board (with external SD Card adapter!) is now on GitHub:
GitHub - tjaekel/NUCLEO-U575ZI-Q_USB_ECM: USB_ECM with NUCLEO-U575ZI-Q
Have fun with it.
BTW: I want to change project to get rid of needed SD Card, e.g. to read web pages from MCU flash memory.
(but a separate topic: AZURE RTOS FileX has a "missing feature", e.g. read files from flash, but without a FAT (block oriented) file system... - more in a separate thread)
2024-01-29 09:46 PM
I have the NUCLEO-U575ZI-Q working, for USB ECM - but without a need for the SD Card:
files are stored on internal MCU Flash memory (and read from there).
Approach: instead of using FileX function calls - I have implemented a subset needed to read files with similar functions (w/o a need for FileX, no FAT32 file system, no SD Card).
Project is here:
2024-02-06 10:19 PM
I can confirm now: USB ECM works on:
So, just still looking for a Windows driver, as USB ECM (not RNDIS).
The latest project for:
is here:
2024-02-08 04:39 PM
It works now also on Windows OS.
See a new Ethernet adapter when USB-C is plugged in.
Watch the UART in order to know what the IP address of the MCU is.
Now a web browser should be able to open the MCU internal web page via: http://ipaddr/index.html
Dear STM Team:
please, could you consider to license the Belcarra USBLAN driver?
It would be nice if STM (or AZURE RTOS team (Microsoft)) could bundle this driver with their STM demos for USB ECM. Thank you.
The Belcarra USBLAN (USB ECM) driver can be found here:
http://usblan.belcarra.com http://www.belcarra.com
2024-02-14 11:40 PM
Very nice project. Thanks for all the details.
How did you connect the STM32U575ZI-Q board to the Android phone? Regular USB-C cable or OTG cable?
I've the same board and downloaded your github project, built and loaded on the board.
I See this on the Terra-Term
Starting DHCP Client....
It never get IP address.
2024-02-15 12:05 AM
Cool, you have already success to compile and run - good to know.
Android:
I use a regular USB-C to USB-C cable. My Galaxy has USB-C.
So, 2x USB: 1x for STM-LINK and power (with VCP UART, on PC), 1x USB-C USR (the other one to Android phone).
Go on (my) Android to "Settings" -> "Mobile Hotspot and Tethering":
see "Ethernet tethering" there (at the bottom for me):
Yes, I like it as well (even I do not use right now, but cool to see that "network via USB" works).
If this fails on Android phone - still an option to ty on Linux (with a VM on Windows), on MacOS.
Please,
let me know if you see it working (I like to see it working "somewhere else").