Why STM32H747i USB host so unstable with reg OTG_HS_HPRT change from 0x1005 to 0x1401 ?
I bought a STM32H747i-DISCO board to learning USB HOST to drive a camera, I found the usb host is very unstable, every is fine except suddenly dropout which meanings the port disabled, I debug and struggle for months with no nothing solved. the USB HOST2.0+ULPY program used freeRTOS V10.3.1 with TouchGFX 17.0, I believe two of them has no side effects with usb host problem what I found is:
- problem 1: few second or few minutes after reset board, usb suddenly dropout, the value of reg HRPT(0x40040440) change from normal 0x1005(good) to 0x1401(bad), which means PENA change from 1 to 0, so USBH_LL_PortDisabled() is called, although it is not disconnect but actually it do is! the data tranfer stopped and there is no SOF frame from now.
- problem 2: can't enumerate or do class request before camera is ready to use, the reason is CTRL TRANSFER can't succeed, I do very hard debug and even modify usbh_core.c and usbh_ctrreq.c and has_hcd.c to find what happend, I believe the LIB's bug is not much except not tune with ISC transfer, It seems a hardware problem.
- if prombem 1 happen, I can't reconnect usb device anymore by software, even if I reset HOST core... I have changed all delay, add some delay, modify USB HOST lib, useless.
- to solve problem 2,I use oscilloscope found sometimes D+ and D- line's Vol Voltage is little high, normally it should be less than 0.4V, why ths happen? I have no idea. another thing , I read usb3320 datasheet and found that the capacitance of VUBS should be 120uF, so I change the cap from 10uF to 120uf, and add 1uF+0.1uF to camera side,The situation is a little better.
- at last I use a notebook PC's usb port to power the DISCO board, and another usb port to connect STLINKV3, I found the fact: when STLINKV3 is NOT connected, usb dropout is GONE!
why? what I missed?
