#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

  • Giovanni Di Sirio

    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

     
  • Giovanni Di Sirio

    • assigned_to: nobody --> gdisirio
    • priority: 5 --> 3
    • milestone: 953057 --> 2.4.0
    • status: open --> open-accepted
     
  • Giovanni Di Sirio

    • status: open-accepted --> open-postponed
     
  • Giovanni Di Sirio

    Will be fixed post 2.6.0.

     
  • Giovanni Di Sirio

    • 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?

     
  • Giovanni Di Sirio

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

     
  • Giovanni Di Sirio

    • status: open-postponed --> closed-fixed
     
  • Giovanni Di Sirio

    Fixed in 2.6.4stable, 2.7.0unstable and 3.0.0development. Fixed in repository.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks