Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#373 Configuration descriptors larger than 127 bytes don't work

closed-fixed
2014-05-09
2013-01-26
No

If you set a configuration descriptor larger than 127 bytes the USB device won't work at all.

The problem is that EP0 IN/OUT data transfers are handled just as any other endpoint transfers, and the registers are different.

Particularly, in the OTG_FS_DIEPTSIZ0 register the XFRSIZ bit field has ONLY 7 bits, hence the limitation to 127 bytes.

I've traced the execution of a working example of the ST OTG library, and what is does for EP0 IN transfers is splitting it in several transfers of the maximum packet length, setting PKTCNT=1 for each and enabling the completion interrupt where a new transfer is set up until there are no more bytes to transfer.

Discussion

  • Hi, this is a known problem, it has been discussed in the forum for a while, fixing it requires a special code path for EP0 only so it is not a simple fix. Thanks for opening a ticket anyway.

    Giovanni

     
    • assigned_to: nobody --> gdisirio
    • priority: 5 --> 3
    • milestone: 953057 --> 2.4.0
    • status: open --> open-accepted
     
    • status: open-accepted --> open-postponed
     
  • Will be fixed post 2.6.0.

     
    • Group: 2.4.0 --> 2.6.2
     
  • avrhack
    avrhack
    2014-04-26

    Any chance this can be given some attention as it's completely stopped the project I'm working on?

     
  • I committed an experimental fix in the repository trunk, could you confirm it works in your scenario?

     
    • status: open-postponed --> closed-fixed
     
  • Fixed in 2.6.4stable, 2.7.0unstable and 3.0.0development. Fixed in repository.