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

Fix USB Interrupt Wiring #8

Merged
merged 6 commits into from
Oct 28, 2024
Merged

Fix USB Interrupt Wiring #8

merged 6 commits into from
Oct 28, 2024

Conversation

Codetector1374
Copy link
Member

@Codetector1374 Codetector1374 commented Sep 30, 2024

Have verified the global interrupt is the one that actually fires.

The LP/HP interrupt is for USBD, which does not exist on V30x chips.

I am pretty sure the USB_WAKEUP one is for USBD not FS/OTG. Have verified on wakeup / suspend, the main OTG_FS interrupt is fired.

@@ -15,8 +15,10 @@
register: AHBRSTR
field: USBHSRST
interrupts:
- { "signal": "GLOBAL", "interrupt": "USBHS" }
- { "signal": "WAKEUP", "interrupt": "USBHS_WKUP" }
- signal: GLOBAL
Copy link
Member Author

Choose a reason for hiding this comment

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

Pure style change while we are here.

@andelf andelf self-requested a review October 1, 2024 00:30
@Codetector1374 Codetector1374 marked this pull request as draft October 8, 2024 08:03
@Codetector1374 Codetector1374 marked this pull request as ready for review October 28, 2024 00:47
@Codetector1374
Copy link
Member Author

This should be ready to review / merged. Mostly added some enum so things are a bit easier to use / no magic constants.
also changed the uep_mod from array to individual register since they each control different end points it's a bit hard to understand when they are just labeled "high / low"

Copy link
Contributor

@andelf andelf left a comment

Choose a reason for hiding this comment

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

Looks good

@andelf andelf merged commit 58ee75b into ch32-rs:main Oct 28, 2024
1 check passed
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