[STM32F303][USB FS] Isochronous endpoint: 1 ms frame with a large buffer.
[STM32F303][USB FS] Isochronous endpoint: 1 ms frame with a large buffer.
Hello,
I would like to know how I could setup an isochronous endpoint with a large payload.
USB specification and RM0316 manual:
- USB 2.0 specification report that in FS mode, it is allowed to send a payload of 1023 bytes.
- The RM0316 manual, at page 1083, describes the USB_COUNTn_TX as follows:
- These bits are not used since packet size is limited by USB specifications to 1023 bytes.
- The RM0316 manual, at page 1084 (USB_COUNTn_RX - BL_SIZE) states as follows:
- With this block size the allocated buffer size theoretically ranges from 32 to 1024 bytes, which is the longest packet size allowed by USB standard specifications.
These encouraging words are followed by this enigmatic phrase:
However, the applicable size is limited by the available buffer memory.
Does "available buffer memory" refers to the USB SRAM?
So, is it correct that I could never setup a payload buffer greather than ~256B?
Let me try to briefly explain myself with the following SRAM allocation schema (ischronous endp uses double buffer feature):
+-------------------------------------------------+
| SRAM (512B) |
+--------+---------+--------+----------+----------+
| BTABLE | ep0 out | ep0 in | ep1 isoc | ep1 isoc |
+--------+---------+--------+----------+----------+
| 16B | 64B | 64B | yB | yB |
+--------+---------+--------+----------+----------+For this example assume that BTABLE contains configurations for ep0 and ep1 only (16 Bytes)
y = (512-16-64-64)/2 = 184 bytes.
Also, by shrinking ep0 to 8 bytes, we have:
y = (512-16-8-8)/2 = 240 bytes.
In this simple (and optimistic) case, how could I setup an ISOC endp that could send more than 240 bytes inside a 1ms frame (bInterval = 1) ?
Thank you for the support.
