-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add support for ADC on STM32 H7 series #24812
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
Conversation
|
^^@ABOSTM |
erwango
left a comment
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.
Regarding the ADC1/2 common node, impact I have in mind in having one node for both instances is that you can't invoke them separately in an application. Looking to reference manual, it seems though that ADC1 and ADC2 doesn't share all resources and ADC1 could be used with ADC2 in a master/slave mode. Running these instances in parallel is not possible today due to driver limitation, so you're not breaking anything. Also I'm not enough familiar with ADC to say if this mode is really something that is required in a near future.
So this is fine for now, but maybe we'll have to come back on this later.
Anyway, please use ADC1_2 for disambiguation.
|
@erwango I'll adjust node label to |
erwango
left a comment
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.
Let's go with adc1_2
|
All checks passed. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
|
@erwango updated number of channels in the driver to 20, as H7 has 20 valid external channels (F7 or F4 have 19, so the number was actually wrong). |
|
can you rebase to resolve merge conflict. |
|
@galak done |
Add support for ADC on H7 series. Note that ADC1 and ADC2 share the same register set, so it is added as "adc1_2". Signed-off-by: Gerard Marull-Paretas <[email protected]>
Enable ADC on Nucleo H743ZI board (ADC12 channel 15). Signed-off-by: Gerard Marull-Paretas <[email protected]>
Performed quick tests on Nucleo H743ZI board on ADC12 CH15 and ADC3 CH6 using a signal generator as an analog test signal.
NOTE: I think that current STM32 ADC driver needs a rework, as it's in a kind of "ifdef hell" state.