EHCI (USB Host) FRINDEX register: poor update frequency?

jmarsh

Well-known member
Bit of a long shot but I figure it can't hurt to ask...
Has anyone else tried to use the FRINDEX register of the USB controller in host mode on the T4? It only seems to update when the frame changes rather than every microframe (e.g. the lowest 3 bits are always 0), despite the reference manual and the EHCI specification saying otherwise. I can put this code in loop():
Code:
  uint32_t frindex = USB2_FRINDEX;
  if (frindex & 7) printf("FRINDEX: %08lX\n", frindex);
and it never prints anything. There's no timers or synchronized calls that would cause my code to only execute once per millisecond, and the periodic schedule is definitely running because I have isochronous transfers running in the background (which is why I need an accurate value from FRINDEX in the first place).

Edit: never mind, I figured it out... it only increments every microframe when a high-speed device is attached. Otherwise it jumps by eight (a full frame) each update. A bit annoying since there's no way of knowing if the next periodic frame will begin 1 millisecond from now or only 1/8th of a millisecond...
 
Last edited:
Back
Top