AnsweredAssumed Answered

[OTG + documentation + Cube] OTG_HS_GUSBCFG.TRDT values

Question asked by waclawek.jan on Aug 29, 2017
Latest reply on Sep 16, 2017 by waclawek.jan

In RM0090 rev.15, OTG_HS_GUSBCFG.TRDT description (p1410) links to Table9, which gives a single value, 0x09.


However, in CubeF4, the TRDT value is determined based on the actual link speed (regardless of whether internal FS_PHY is used or an external ULIP PHY), as determined by USB_GetDevSpeed(), i.e. by reading OTG_HS_DSTS.ENUMSPD: if it is USB_OTG_SPEED_HIGH, the value of USBD_HS_TRDT_VALUE (== 0x09) is used; otherwise the value is determined based on AHB speed in the same way as for OTG_FS (which is contrary to documentation which calls for a single value).


IMO, both are wrong.


My guess is, that the documentation should say "0x09 if ULPI PHY is used, the variable value based on AHB asi in the OTG_FS chapter if the internal FS_PHY is used".


And then Cube should follow this rule, i.e. set TRDT based on the PHY used rather than based on the detected speed.