• AVR Freaks

PIC32MX USB zero-byte transfers

Author
mhamel
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2012/12/17 14:23:45
  • Location: 0
  • Status: offline
2012/12/17 14:34:48 (permalink)
0

PIC32MX USB zero-byte transfers

I'm trying to return a zero-byte packet to a USB host using a bulk endpoint on the PIC32MX; this is needed to terminate a multi-packet sequence that is a multiple of 64 bytes long. I think its working, but my usb driver isn't getting an EVENT_TRANSFER notification. In fact, I can see that the usb_device.c code isn't getting an interrupt at all. This makes scheduling the next transfer awkward as I'm trying to make everything interrupt-driven. I think its happening on OUT endpoints as well; if the host sends data that happens to be a multiple of 64 bytes, I don't see the zero-byte transfer that ends the sequence, which is what tells me that the host is done.
 
Does anyone know of a way around this? It looks like the hardware is doing the transfers but not posting an interrupt, which seems a strange thing to omit given that zero-length packets are a required feature.
 
Thanks,
Michael
#1

2 Replies Related Threads

    Antipodean
    Super Member
    • Total Posts : 1724
    • Reward points : 0
    • Joined: 2008/12/09 10:19:08
    • Location: Didcot, United Kingdom
    • Status: online
    Re:PIC32MX USB zero-byte transfers 2012/12/18 04:17:05 (permalink)
    0
    The USB engine should do this itself (it certainly does on the PIC24 I used), but I have no expereince with the PIC32 version.

    Do not use my alias in your message body when replying, your message will disappear ...

    Alan
    #2
    mhamel
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2012/12/17 14:23:45
    • Location: 0
    • Status: offline
    Re:PIC32MX USB zero-byte transfers 2012/12/18 13:23:40 (permalink)
    0
    The problem isn't that the USB engine isn't doing the zero-byte transfers, its that I have no way of telling when they complete - either when the host sends one, or when the PIC sends one. This makes chaining transfers difficult.
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5