-
Notifications
You must be signed in to change notification settings - Fork 69
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
Support USB on the stm32f303xd/xe devices #255
Conversation
124bae5
to
ab61a1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Thank you!
Implementation wise, this looks pretty reasonable, so let's go for it.
898889b
to
ec77778
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to bother you with the changelog. Otherwise, this looks good to go :)
The 303xd and 303xe series devices do not have AF14 for pins PA11 and PA12, so the existing implementation will not work for those devices. According to an ST document [1], stm32f303xd and xe do not require any particular mode for the PA11 and PA12 pin, so I've parameterized the `usb::Peripheral` type using traits so that any mode will be supported. I've tried to follow a familiar pattern reminescent of the gpio alternate function configurations. [1]: https://www.st.com/resource/en/application_note/dm00260340-migrating-between-stm32f303-and-stm32f302-line-products-stmicroelectronics.pdf
Co-authored-by: Fabian <[email protected]>
ebadc98
to
f3046e3
Compare
Woops! No problem, thanks for all of your awesome work on this repo! |
7144e89
to
003ea67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! 👍
The 303xd and 303xe series devices do not have AF14 for pins PA11 and
PA12, so the existing implementation will not work for those devices.
According to an ST document 1, stm32f303xd and xe do not require any
particular mode for the PA11 and PA12 pin, so I've parameterized the
usb::Peripheral
type using traits so that any mode will besupported. I've tried to follow a familiar pattern reminescent of the
gpio alternate function configurations.
This is of course a breaking change so I'm open to other approaches if
anyone has opinions. This seemed to me to be the most elegant and
accurate way to handle this.