AnsweredAssumed Answered

[STM32F4 USB Compliance] Entering in Test_Packet mode

Question asked by albet.bernat on Nov 23, 2015
Hi!

In order to test the USB of a STM32F405RGT6 (at compliance level), we need to set the USB peripheral in Test_Packet mode, so we can run the eye diagram test. We saw there are 2 registers, the OTG_HS_HPRT (bits PTCTL) and the OTG_HS_DCTL (bits TCTL). We are using the High Speed OTG peripheral, configured as a Host. I'd like to know which diferences exist in functionality between PTCTL and TCTL, and why no signal is generated when we set any or both of the PTCTL/TCTL bits to 0x4 (Test_Packet mode). Or if we need to follow some specific sequence to enter this mode. When these bits were set, the USB was fully configured and working as expected when a device was plugged in, although no device was connected when we tried to enter in Test_Packet mode. No further info can be found at datasheet or reference manual, I saw no application note either or error in the errata sheet (in case of HW issue).

Looking at the generic peripheral library for STMF4xx, a function called USBD_RunTestMode @ usbd_core.c is implemented when in device mode, which writes to the DCTL register, but there is no such function when in host mode @ usbh_core.c. Could you please help us setting the USB in this mode?

Thank you!

Outcomes