Closed lulle2007200 closed 4 years ago
Yes, probably you are right. I need to recheck code, also asm.
Yes, you are right. It was a typo. But actually result is the same since bitfield COUNTn_RX[9:0] is r/o. Will be fixed.
BTW. According to USB FS specs, EP size greater than 64 bytes is disallowed.
Thanks for looking into it. Also im aware that EP greater size 64 bytes is illegal. Makes me wonder why they even have that weird system to allow EP size greater than 62 bytes, but thats offtopic.
I've been wondered so many times by ST's solutions that I no longer ask myself "why did they do that way?".
I use 128 to little increase speed. Worked in windows 10.
What is going on here? https://github.com/dmitrystu/libusb_stm32/blob/master/src/usbd_stm32l433_devfs.c#L245 If endpoint size is greater than 62, we should align it by 32. Then left shift by 5 bits to get number of blocks in bits 10:14, then set bit 15 to 1 to indicate block size of 32 bytes and substract 0x400 (reduce NUM_BLOCK by one, because NUM_BLOCK=Number of 32 byte blocks - 1) So should't it be
_rxcnt = 0x8000 - 0x400 + (epsize << 5)
? Or am i missing something?