Skip to content

Conversation

@kamtom480
Copy link

After the #4689, the Spresense port stopped working. EP descriptor for CDC and MSC set max packet size to 64. For USB_HIGHSPEED this should be 512.

dhalbert
dhalbert previously approved these changes May 18, 2021
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you! I thought there might be an issue with Spresense given the significant changes in USB, but I hadn't had a chance to test it yet.

Have you tested turning off any devices in boot.py? I hope I handled the endpoint assignment properly given your fixed endpoint assignments, but that is another thing to test.

@hathach
Copy link
Member

hathach commented May 18, 2021

@dhalbert this applies to imxrt port as well. For highspeed bulk endpoint size must be 512

@kamtom480
Copy link
Author

@dhalbert I tried these two functions and they worked:

storage.disable_usb_device()
usb_cdc.enable(console=False, data=False)

Do you know why the tests are not working?

@dhalbert
Copy link
Collaborator

Do you know why the tests are not working?

GitHub Actions has had a lot of trouble in the past day. https://www.githubstatus.com/ looks OK now, but if you click on Incident History, you'll see an extended period yesterday when it was not doing well.

MIDI also needs this same fix, so I will push a commit for it as well.

@dhalbert
Copy link
Collaborator

@dhalbert this applies to imxrt port as well. For highspeed bulk endpoint size must be 512

Thanks -- it is port-independent code and will be applied across all.

@dhalbert dhalbert force-pushed the spresense_usb_fix branch from a6090d2 to aebee2d Compare May 19, 2021 11:45
@dhalbert
Copy link
Collaborator

I pushed a change, though there was git strangeness. I had to push twice.

Note also that we are using automated C code formatting now, and it indents the #ifs. You can set this up for yourself by doing:

$ sudo add-apt-repository ppa:pybricks/ppa
$ sudo apt-get update
$ sudo apt install uncrustify
$ pip3 install pre-commit
$ cd <your repo clone>
$ pre-commit install   # only need to do this once

From this point on, it will run some checks before each commit, reformatting files as necessary. There are other checks besides the formatting. More info is here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dhalbert dhalbert merged commit 4c928ac into adafruit:main May 19, 2021
@kamtom480
Copy link
Author

@dhalbert Thank you for the information! I will use it next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants