• AVR Freaks

U1SOF value (USB_SOF_THRESHOLD_xx) is too short on host stack

Author
chinzei
Super Member
  • Total Posts : 2250
  • Reward points : 0
  • Joined: 2003/11/07 12:39:02
  • Location: Tokyo, Japan
  • Status: offline
2012/11/04 21:16:27 (permalink)
5 (1)

U1SOF value (USB_SOF_THRESHOLD_xx) is too short on host stack

> To MAL team,

U1SOF value on usb_host_local.h is too short, even on the latest MAL.

C:\Microchip Solutions v2012-10-15\Microchip\USB\usb_host_local.h

#define USB_SOF_THRESHOLD_08                0x12    // U1SOF - Threshold for a max packet size of 8
#define USB_SOF_THRESHOLD_16                0x1A    // U1SOF - Threshold for a max packet size of 16
#define USB_SOF_THRESHOLD_32                0x2A    // U1SOF - Threshold for a max packet size of 32
#define USB_SOF_THRESHOLD_64                0x4A    // U1SOF - Threshold for a max packet size of 64

Of course, these values are typical ones described on the data sheets, but the values on the data sheets are wrong.
These values count up just major "bytes" on the packets, ignoring bit time of bit-stuff, EOP, and inter-packet delay

I've once pointed out this issue in this post,
http://www.microchip.com/forums/fb.ashx?m=490793

And then, PIC32 OTG user's manual added this chapter,
http://ww1.microchip.com/...n/DeviceDoc/61126F.pdf
27.4.1 Configuring the SOF Threshold (page 27-51)

The calculation example of this chapter clearly shows that USB_SOF_THRESHOLD_64 should be 0x4E, instead of 0x4A
613 bits = 78 bytes (round up) = 0x4E

But this value is still too short, because it doesn't count in bit stuff yet, as Note 3 tells.
I recommend MAL team to discuss on U1SOF issue with the designer of OTG silicon macro well.

Tsuneo
#1

2 Replies Related Threads

    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    Re:U1SOF value (USB_SOF_THRESHOLD_xx) is too short on host stack 2013/07/14 07:15:46 (permalink)
    0
    Hello Tsuneo
     
    Awesome discover! do you know if MAL Team has fixed this now at 2013?
     
    My 2000 post count Smile, a piece of cake vs Dario

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #2
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:U1SOF value (USB_SOF_THRESHOLD_xx) is too short on host stack 2013/07/14 08:50:10 (permalink)
    0
    ah ah nice and interesting grin
    I still have to decide what to do as I approach 40,000 ..

    GENOVA :D :D ! GODO
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5