cancel
Showing results for 
Search instead for 
Did you mean: 

Having some trouble getting USBX device example working

ron239955_stm1
Associate III

I'm working on a custom STM32H743IIT6 based board, and I'm trying to get USB device working. I've had some experience with the ST USB middleware, and have successfully implemented several projects using it. This is the first time I've tried to use AzureRTOS. I've been able to get MSC host working on the HS port, but I can't get the device side to be recognized.

To streamline debugging, I decided to start with the Ux_Device_HID_CDC_ACM example code. I have an H745 DISCO board, and I was able to get the example running on the DISCO. The only thing I had to do was switch it to use the USB FS port instead of the HS port (the example is meant to be used with the H747 DISCO board). When it's running, I can see the HID/CDC device using a USB probe app on my Mac.

I then tried to run it on my H743 board. Since it's so simple, I figured that I should be able to run the example with a few modifications. My hardware, like the DISCO board, has a 25MHz oscillator, so I shouldn't even need to change any clock settings. I commented out the code that manages the M4 core, and I removed the call to enable the SMPS. The code runs and it makes it through initialization without errors. However, it never appears as a USB device on my computer. The PCD interrupt handler gets called when plugging and unplugging the cable, but only the suspend flag ever gets set. No callbacks ever are called.

I'm not sure what I'm missing. The external USB hardware is quite simple and it's the same circuit I've been using for 10+ years. I double checked the design and tried multiple boards in case there was a hardware issue.

Can anyone suggest anything that might help me debug this?

I've attached the relevant part of the schematic and a trace from a USB analyzer.

Some other information:

The USB_FS_P signal in my schematic is connected to PA12

USB_FS_N is connected to PA11

VDD33USB is connected to +3V3, as are all other VDD pins

 

1 ACCEPTED SOLUTION

Accepted Solutions
ron239955_stm1
Associate III

I finally found it, there was an error in my schematic after all!

View solution in original post

3 REPLIES 3
FBL
ST Employee

Hi @ron239955_stm1 

 


@ron239955_stm1 wrote:

I've attached the relevant part of the schematic and a trace from a USB analyzer.


It seems that attached files are missing from your post!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ron239955_stm1
Associate III

Apologies! Here they are.

ron239955_stm1
Associate III

I finally found it, there was an error in my schematic after all!