-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double buffer documentation #72
Comments
The double-buffered feature can be applied to the bulk endpoint only. In this mode, the endpoint will not be NAKed after receive and will use a secondary buffer when core reads received data from the primary buffer. // OK for the doublebuffered
#define CDC_EP0_SIZE 0x08
#define CDC_RXD_EP 0x01
#define CDC_TXD_EP 0x82
#define CDC_DATA_SZ 0x40
#define CDC_NTF_EP 0x83
#define CDC_NTF_SZ 0x08
#define HID_RIN_EP 0x84
#define HID_RIN_SZ 0x10 PS. I see no difference in the serial speed test for both configurations (single-buffered and double-buffered). Need to check transfers on the bus with the logic analyzer. |
Why do you automatically double the buffer for the isochronous endpoint? It seems to me that a separate USB_EPTYPE_DBLBUF option for an isochronous endpoint would be appropriate. |
According to chapter 32.5.4 "RM0367 Reference manual Ultra-low-power STM32L0x3 advanced ARM ® -based 32-bit MCUs" (same for the other DEVFS) isochronous endpoints are always doublebufered. For the OTGFS based devices, I kept this for behavioral compatibility. |
Thanks for the clarification. |
@dmitrystu: Regarding the "not real" double buffered functionality... Is this a limitation of the OTGFS USB core? Is it because it is not possible to put additional data into the TX FIFO while the endpoint is transmitting? |
No, this is a limitation of the DEVFS core. |
It would be interesting to have a demo or docs for the "not real" doublebuf functionality. Currently I have no idea how to use it - it didn't work when I simply "tried switching it on"
The text was updated successfully, but these errors were encountered: