2024-11-04 03:16 PM
I just started looking at the STM32C071 family as an alternative to the STM32F042 and STM32F072 we currently use. To my disappointment the USB stack for the C071 is a total mess (dozens of files and complete spaghetti) and on top of that it seems to be written by Microsoft. So there is absolutely no way we are going to use that.
Did I miss some other option for the USB device library? This USBX stuff definitely is no option at all.
At first glance it looks like there are no significant differences between the USB hardware of the C0 and F0 if only used as device not host. So I am wondering if I can simply use the F0 libraries (which we have debugged and optimized…) on the C0. Or are there any hidden traps?
2024-11-04 10:11 PM - edited 2024-11-04 10:14 PM
C0 series USB is basically the same as G0 and not the same as F0. You may adopt the G0 stuff. Or use another, not so versatile solution - hint below. ;)
Also, one of recent articles in Knowledge Base describe the process of implementing classic STM32 USB stack on devices without full support: https://community.st.com/t5/stm32-mcus/how-to-use-stmicroelectronics-classic-usb-device-middleware-with/ta-p/599274
2024-11-05 07:41 AM
Thank you. Most likely I will go with modifying my existing code to fit the C071. It looks like there are not many differences in the hardware, besides the host function that I don't need there seems to be only the pointer register for the buffer descriptor that is missing.
ST libraries are such a mess, I really don't want to debug another USB stack. We need the stuff to work reliably and not look like a pot of overcooked spaghetti especially not if it comes with a load of foul M$ sauce.