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

Interrupt out pipe toggle bit does not change #4

Open
Ryzee119 opened this issue Jan 17, 2020 · 0 comments
Open

Interrupt out pipe toggle bit does not change #4

Ryzee119 opened this issue Jan 17, 2020 · 0 comments

Comments

@Ryzee119
Copy link

Ryzee119 commented Jan 17, 2020

When using tusb_host_xfer_data on a interrupt endpoint only the first packet is registered by my USB device. Subsequent packets are ignored.

The hc->toggle_out variable is never toggled by tusb_otg_out_channel_handler . Interrupt endpoints should behave the same as bulk endpoints in this regard.

The below code should also check HCCHAR_INTR and toggle the toggle_out bit.

if(HcEpType == HCCHAR_BULK){
hc->toggle_out ^= 1U;
}

I changed it to this which resolved my issue.

if(HcEpType == HCCHAR_BULK || HcEpType == HCCHAR_INTR){
    hc->toggle_out ^= 1U;
}

Reference:
https://books.google.com.au/books?id=pkefBgAAQBAJ&lpg=PA52&ots=6_nyePBwxH&dq=interrupt%20endpoint%20toggle%20bits&pg=PA52#v=onepage&q&f=false

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

No branches or pull requests

1 participant