['F4 OTG] OTG_HFIR handling
1.
In RM0090 rev.17, OTG_FS chapter, there's a 34.9 Dynamic update of the OTG_FS_HFIR register subchapter saying, "The USB core embeds a dynamic trimming capability of SOF framing period in host mode allowing to synchronize an external device with the SOF frames." then showing on Fig.391 how does it exactly work. However, the OTG_FS Host frame interval register (OTG_FS_HFIR) register description says, " Do not change the value of this field after the initial configuration." So, can the frame interval be dynamically updated in OTG_FS, or not?
2.
In RM0090 rev.17. OTG_HS chapter, in description of OTG_HS Host frame interval register (OTG_HS_HFIR) register, while the narrative mentions microframes for HS, it would be nice if also the formula for HS - 125us microframes (after correction, see below) would be added, same as in RM0390
3.
In RM0390 rev.4, 31.15.19 OTG host frame interval register (OTG_HFIR) (btw. could you please in RM0390 remove numbering/subchaptering of individual registers, and do the a proper global/host/device subchaptering of the USB_OTG registers subchapter? thanks.) there is a remark, "Caution: RLDCTRL = 1 is not recommended." Why? Does setting RLDCTRL have any other effect than disabling the dynamic update of HFIR - which I believe is used only in some niche applications anyway? And what is the purpose of that bit at all, why wouldn't simply not touching FRIVL all the time suffice? Also, the narrative for both variants of the FRIVL fields says, " Do not change the value of this field after the initial configuration, unless the RLDCTRL bit is set."; however, RLDCLR bit's description says, "1: The HFIR cannot be reloaded dynamically". Shouldn't the above sentence say, " Do not change the value of this field after the initial configuration, if the RLDCTRL bit is set."?
4.
In both RMs (and both HS and FS in RM0090), the formula for OTG_HFIR.FRIVL is messy:
Frame interval = 1 ms × (FRIVL - 1)
In RM0090, there's also some additional garbage:
frame duration × PHY clock frequency
which makes no sense whatsoever.
The proper formula (assuming the counter HFNUM.FTREM counts indeed from FRIVL down to 0) is
LS, FS: FRIVL=1ms x PHY clock frequency - 1
HS: FRIVL=125us x PHY clock frequency - 1
5.
In both RMs, in the "Host initialization" subchapters (in both the FS and HS chapters in RM0090), there's an item saying "10. Program the HFIR register with a value corresponding to the selected PHY clock 1" The last 1 is obviously spurious; could that be a footnote in the original?
ST, please comment, correct.
Thanks,
JW
