cancel
Showing results for 
Search instead for 
Did you mean: 

USB_OTG_HS and USBX (host only, MSC) doesn't detect connection.

HTD
Senior III

I have a U599 embedded display board, that has a dedicated software pack for TouchGFX.

I was able to configure most peripherals on the board, including SD card and FILEX that required THREADX.

So far so good, so I activated USB_OTG_HS and USBX. I have it configured as follows:

HTD_0-1700253399771.pngHTD_1-1700253444784.pngHTD_2-1700253542867.pngHTD_3-1700253565435.pngHTD_4-1700253590062.pngHTD_5-1700253619929.pngHTD_6-1700253639993.pngHTD_7-1700253659923.png

I start the application. The host thread is created and started. All initialization passes without errors. The USB stick is powered. The `ux_host_event_callback` function is correctly registered. Yet, when I connect or disconnect the USB stick nothing happens. It's not detected. It seems like the USB interrupt is not triggered.

I tried to manually poll the PA11 and PA12 pin states (using MCU and SWD debugging). PA11 is low, while PA12 gets high when the USB stick is connected. So electrically it seems OK.

I enabled USB_OTG_HS global interrupt. It didn't help.

How should I start to diagnose the problem? I don't think it's anything on the data / protocol level, because no code responsible for any data exchange is even started. I placed some breakpoints in various functions but none of them are called, since it seems like connecting the USB stick just doesn't generate any interrupt, or IDK, maybe it's not listened to.

BTW, I tested my USB connector with another embedded display board (one with H757 MCU) and it just worked without any problems. For the H7 however, different USB stack was provided. It was just USB_HOST_M7 and FATFS. It used the same USB connector, so that allowed me to rule out any electrical issues.

1 REPLY 1
andy817501
Associate

Hello, have you solved it? I also encountered a similar problem