Skip to content
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

Add a HCD driver for MSP-EXP432E401Y #1213

Merged
merged 11 commits into from
Dec 7, 2021

Conversation

kkitayam
Copy link
Collaborator

@kkitayam kkitayam commented Nov 28, 2021

Describe the PR
Add a HCD driver for MSP-EXP432E401Y.

This patch supports only for low and full speed devices.

Additional context
I have tested cdc_msc_hid with only a low speed mouse and hid_controller with a PS4 DS2 game pad.

@hathach
Copy link
Owner

hathach commented Nov 29, 2021

another great port, thank you very much, please give me a bit of time to test this out.

@kkitayam
Copy link
Collaborator Author

I have found an issue with the handling of the HUB. I will let you know the issue is fixed.

@hathach
Copy link
Owner

hathach commented Nov 29, 2021

I have found an issue with the handling of the HUB. I will let you know the issue is fixed.

You could skip the hub port for now if that is too troublesome. I have my own temp code to handle hub as well like blocking delay and some hack here and there within enumeration code.

@kkitayam
Copy link
Collaborator Author

I have updated this patch for handling a HUB. However, the enumeration process with a HUB still fails.
I guess some race condition occur on a control transfer. Current hcd_musb.c assumes that a new transaction will not be requested(calling hcd_setup_send/hcd_edpt_xfer) until the previous transaction has been completed in a control transfer. However, it does appear to be requested.

I'm not familiar with USB host processing and EHCI/OHCI. It seems that ehci.c and ohci.c has a something like as a link list for queueing transaction requests. I guess that the queue enables speculative requests.

@hathach
Copy link
Owner

hathach commented Dec 1, 2021

@kkitayam yeah, the enumeration via hub is still work in progress. No worries at all if it doesn't work out especially the usbh control flow isn't final just yet. We could come back to this later on.

@kkitayam
Copy link
Collaborator Author

kkitayam commented Dec 3, 2021

@hathach
Thank you for your comment.
I will stop investigating the issue regarding enumeration with HUB for now.

In addition I have confirmed hid_controller works with my PS4 DS2 gamepad. So far, I confirmed interrupt IN transfers only work properly. This weekend I'm going to run bulk transfers.

@kkitayam
Copy link
Collaborator Author

kkitayam commented Dec 5, 2021

I have confirmed bulk transfers work by connecting cdc_msc_hid to msc_dual_lun running on a raspberry pi pico.

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

superb! thank you very much for another great PR. The changes look perfect, I have tried to test it with tm4c123 board, however that board seems to need an a bit of extra works to set up as host mode (will implement later as separate PR).

PS: I did push some minor changes to get host example build msp432e4 in ci and other minor changes.

@hathach hathach merged commit c157837 into hathach:master Dec 7, 2021
@hathach
Copy link
Owner

hathach commented Dec 7, 2021

I have confirmed bulk transfers work by connecting cdc_msc_hid to msc_dual_lun running on a raspberry pi pico.

The msc example isn't good yet, previously I have an running example that could do some basic file navigation with fatfs such as mkdir, cd, list, cat but it is out of date with latest fatfs. I will try to get it updated to have an more fancy msc host example :)

@kkitayam kkitayam deleted the add_hcd_for_msp_exp432e401y branch December 7, 2021 12:43
@kkitayam
Copy link
Collaborator Author

kkitayam commented Dec 7, 2021

Thank you for your comment and for merging this PR!

@hathach
Copy link
Owner

hathach commented Dec 7, 2021

Thank you for your comment and for merging this PR!

I am the one to say thanks 👍 👍

karlp added a commit to karlp/tinyusb that referenced this pull request Nov 24, 2023
It was merged in hathach#1213

Tested personally on a dk-tm4c129x eval board with the cdc_msc_hid
example.

Signed-off-by: Karl Palsson <[email protected]>
karlp added a commit to karlp/tinyusb that referenced this pull request Feb 15, 2024
It was merged in hathach#1213

Tested personally on a dk-tm4c129x eval board with the cdc_msc_hid
example.

Signed-off-by: Karl Palsson <[email protected]>
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.

2 participants