-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Endpoint count causes failure on F412 and similar boards #197
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
Comments
@hierophect It is actually a bug that allow the endpoint 6 to be opened and is fixed recently by #158 |
Currently the Circuitpython USB descriptor only outlines 5 endpoint pairs; cdc_iad, cdc_interfaces, msc_interfaces, hid_interfaces, and audio_control_interface. All share their endpoint address except certain cases for the SAMD21, which are of course excluded on the STM32. So I don't think we should be hitting this ceiling. Does epnum specifically exclude the control endpoint? My debugger shows it at 6, which the appropriate number of endpoints if control is included... Paging @dhalbert for commentary |
@hierophect EP_MAX=6 is including endpoint0, so we can only have up to 5 pairs of endpoints from 1 to 5 at max. So the code is correct, if your debugger show epnum is 6, then it probably overflow the number of supported endpoint on stm32f412 |
Did some internal investigation, was due to extra endpoints in the MIDI descriptor. Thanks for helping clarify, @hathach, and for fixing the excess endpoints bug. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
On the F412 or any other ST board with 6 FS endpoints which is using all of them, the following assert fails:
A debugger reveals that epnum is evaluating to 6, potentially because it includes endpoint 0, or possibly due to a bug. EP_MAX is also 6, as it's based off the raw endpoint macro for the chip, and thus the comparison fails. 5 endpoints, excluding control, are used on the F412 in this case, have worked successfully in versions prior to adafruit/circuitpython#2185
To Reproduce/Fix
Use an F412 with 5 active USB endpoints.
The text was updated successfully, but these errors were encountered: