STM32H7 as USB audio device, with external PHY, USB3343, ULPI
I'm stuck ... on a number of levels, I believe, but first things first.
I have a custom PCB with a "main" 144-pin STMH743, six "DSP" 100-pin STMH743s, and a USB3343 to speak ULPI to a USB port.
Via SAI, the main H7 will be getting 10 to 12 channels of digital audio, two from each of the 5 to 6 DSP H7s.
The 10 to 12 channels of audio are to be sent via USB out to a host; e.g., a DAW running on a computer.
My current obstacle, one I need to get past before dealing with how to "package" up the digital audio to trasmit to the host, is to configure the main MCU's USB to use the ULPI chip and ... have the host even detect/recognize the STM32H7, running as a USB Audio Device.
I am using CubeMX for pretty much everything.
Under Connectivity, I have USB_OTG_HS chosen and configured as External PHY, Device_Only. The Parameter Settings show Speed: Device High Speed 480MBit/s; Physical interface: External Phy.
Under Middleware, I have USB_Device chosen and configured as Class For HS IP: Audio Device Class.
The CubeMX-generated main.c calls MX_USB_DEVICE_Init() which in turn calls USBD_Init(), USBD_RegisterClass(), USBD_AUDIO_RegisterInterface(), USBD_Start(), and HAL_PWREx_EnableUSBVoltageDetector().
From there the program continues runnning through the endless while, but when I connect the PCBs USB port to my Macbook Pro, no USB device is dectect.
Should I assume that I have need to do something after MX_USB_DEVICE_Init? I see that ST's demo program for USB_Device/Audio_Standalone goes to the endless while immediately after it calls the same functions MX_USB_DEVICE_Init does.
Using CubeMX to configure a simple test program, I have gotten a VCP working on a NUCLEO-H743ZI. Of course that was not with ULPI but my Mac certainly recognized the STM32 as USB device. I fully expect setting up and running an Audio Class device to be rather more complex.
I figure that after MX_USB_DEVICE_Init, the device should be visible to a host, but perhaps I'm missing something. I will later have questions about just how one sends all that audio, but first I have to figure out whatever handshaking I need, right? Does anyone have any suggestions on what I might try next?
Thanks.
