Skip to content

Commit a2ad3b7

Browse files
Filip Jagodzinskic1728p9
authored andcommitted
Tests: USB: Decrease the max data size for iso ep
Although the USB spec sets the upper limit on FS isochronous endpoint payloads to 1023 B, this value is hard to test in practice. Moreover, not all the targets Mbed OS supports (like NUCLEO_F207ZG) are able to handle all the endpoints set to max.
1 parent 1ecb873 commit a2ad3b7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

TESTS/usb_device/basic/USBEndpointTester.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,19 @@
4949
#define TEST_SIZE_EP_INT_3 (16)
5050
#define TEST_SIZE_EP_INT_4 TEST_SIZE_EP_INT_MIN
5151

52-
#define TEST_SIZE_EP_ISO_MAX (1023)
52+
53+
/* According to USB spec, the wMaxPacketSize for FS isochronous endpoints
54+
* is 1023 B. There are a couple of reasons this value is not used in tests:
55+
* - some of the boards supported by Mbed OS have too little RAM dedicated
56+
* for USB, making EndpointResolve::valid() fail when all the endpoints (2x
57+
* bulk, 2x interrupt, 2x isochronous, 2x control) are configured to use
58+
* the max value of wMaxPacketSize
59+
* (e.g. NUCLEO_F207ZG has 1.25K of endpoint RAM),
60+
* - given a test host with other USB devices on the bus, it is unlikely
61+
* for the test device to be able to reserve the bandwidth associated with
62+
* high wMaxPacketSize for iso endpoints.
63+
*/
64+
#define TEST_SIZE_EP_ISO_MAX (256)
5365
#define TEST_SIZE_EP_ISO_MIN (1)
5466
#define TEST_SIZE_EP_ISO_0 (0)
5567
#define TEST_SIZE_EP_ISO_1 (0)

0 commit comments

Comments
 (0)