• AVR Freaks

Hot!usb host data0/1 toogle does not work

Author
greenlight
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2018/11/16 00:34:06
  • Location: 0
  • Status: offline
2019/01/29 01:32:54 (permalink)
0

usb host data0/1 toogle does not work

Dear Community,
 
sometimes at USB transfer (USB Host) i am getting the following error.
 
I am getting In transaction (Data1)
and sending back Data1
after this some usb hid devices stop to work and I'm waiting for an answer forever.
 
 
This is an example for error transfer
 
-> setup packet
-> data0 packet
<- ack
 
-> in packet
<- data1 packet
-> ack
 
-> out packet
-> data1 packet
<- ack
 
timeout
 
 
if i understood it correctly, the transfer should always toggle between data0 and data1. At the Set_Configuration the toggle should be reseted to 0.
I am using harmony version 2.06 at pic32mk.
hope someone can help me with this error
#1

5 Replies Related Threads

    bastl
    Starting Member
    • Total Posts : 41
    • Reward points : 0
    • Joined: 2018/12/27 07:25:34
    • Location: 0
    • Status: offline
    Re: usb host data0/1 toogle does not work 2019/01/30 09:15:59 (permalink)
    0
    This is only a guess, but mostly a peripheral hangs on interrupt handel.
    Have a look if your usb peripheral emits an interrupt on reception and if you reset it.
     
    #2
    greenlight
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2018/11/16 00:34:06
    • Location: 0
    • Status: offline
    Re: usb host data0/1 toogle does not work 2019/01/31 01:25:11 (permalink)
    0
    I add the record of the usb transfer. see usbDataToggle.jpg
     
    Most of the HID Devicesignore that the order does not fit during transmission but this one stoppt to work.
    I checked drv_usbfs_host.c pipe->dataToggle. It looks fine for me but it should have a bug that cause this kind of transfer

    Attached Image(s)

    #3
    bastl
    Starting Member
    • Total Posts : 41
    • Reward points : 0
    • Joined: 2018/12/27 07:25:34
    • Location: 0
    • Status: offline
    Re: usb host data0/1 toogle does not work 2019/01/31 09:07:37 (permalink)
    0
    What do want to do ? (with usb)
    What do you mean with toggle ?
    From sight of your micro-controller-board, what do you have plugged in your "usb port" (your notebook, memory-stick, printer, Breadboard, ...?), what type of hardware answers?
    -If you debug maybe your transmission gets out of time ? or other timing problems?
    #4
    greenlight
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2018/11/16 00:34:06
    • Location: 0
    • Status: offline
    Re: usb host data0/1 toogle does not work 2019/02/01 01:22:54 (permalink)
    0
    Hi bastl,
     
    i am using a costum board which works as usb host at to this i connect hid devices. Keyboard Mouse etc.
    99 % of them works fine. But i found a apple mouse which works on my pc but not on my board.
    Thirst i was of the opinion that the bug will be caused by wrong transfer of data0/1. It is not so because the implementation of microchip is perfectly correct. i must have misunderstood the specification.
     
    I uploadet the transfer of the mouse when it is connected to pc.
    Unfortunately, I can't tell the difference between the packages except that the device doesn't answer anymore on my system. I checked the power consumption and they is no overcurrent error during operation.
     
    if you wish i could post all content of the usb transfer packages
    post edited by greenlight - 2019/02/01 01:25:00

    Attached Image(s)

    #5
    bastl
    Starting Member
    • Total Posts : 41
    • Reward points : 0
    • Joined: 2018/12/27 07:25:34
    • Location: 0
    • Status: offline
    Re: usb host data0/1 toogle does not work 2019/02/01 06:35:26 (permalink)
    0
    Oh, I have no experience with apple products.
    In such a case I would have a look at the driver source for apple mice at linux or apple.
    Maybe you have to init the mouse or confirm each transfer.
    Think about, that apple products are developed to work correctly in any circumstances so the host always knows about its conditions so that any movement, click f.e. is exactly comprehensible while you pull the plug.
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5