The USB section of the Xmega AU data sheet seems to be a work of fiction. Does anybody care?
On page 240 it shows the USB transaction complete FIFO registers (FIFOWP and FIFORP) to start off as zeros. That would cause trouble. Actually they start off as ones, as they should. The data sheet call the contents pointers. That seems confusing. Actually they are indexes. Or do they really use negative pointers in Norway? ;)
On page 234, it says when these negative indexes reach the end of the FIFO, they wrap to zero. Ouch,that would be more trouble. Actually they wrap to -1.
On pages 244 and 245 it says bits in the endpoint registers are cleared by writing a one or logical 0 to the bit location. I don't think so. Actually the bits are cleared by using the LAC (Load And Clear) instruction.
There are more things about the USB description that seem unnecessarily confusing to me. For instance the TOGGLE bit in the endpoint STATUS register . It seems to me you could spend a lifetime trying to figure out how to set it or use it. I thnk in fact, the hardware uses it and it is of no use to the software, and the software should not change it. If I'm correct, the datasheet sheet should tell the programmer to keep his cotton pickin' hands off it.
Somehow, in spite of this, the USB ASF seems to work okay. Obviously the programmer wrote the code first, and would have read the manual only if all else failed. Give that programmer a raise! ;)
The page numbers refer to the latest version of the manual. I think that is version F dated April 2013. Unfortunately at the bottom of page one it says version E dated January 2013. You have to scroll down to page 7 to see the correct version.
If I am wrong about this stuff, please let me know. Otherwise I think this should be sent to Atmel.