Skip to content

Don't set rcc.ahb2rstr.adcrst bit when initializing ADCs on L4x5/L4x6#162

Merged
David-OConnor merged 1 commit intoDavid-OConnor:mainfrom
dbristow-otc:main
Dec 3, 2025
Merged

Don't set rcc.ahb2rstr.adcrst bit when initializing ADCs on L4x5/L4x6#162
David-OConnor merged 1 commit intoDavid-OConnor:mainfrom
dbristow-otc:main

Conversation

@dbristow-otc
Copy link
Copy Markdown
Contributor

When configuring multiple ADCs (i.e. ADC1 and ADC2) via the new_adc function, all but the last ADC will be reset. This is because the library calls rcc_en_reset by default, even though it isn't appropriate in this instance. Like the h7 and g4 code, I've added code to manually set the enable register rather than calling the rcc_en_reset macro.

… as this causes the previously-configured ADC registers to be lost
@David-OConnor
Copy link
Copy Markdown
Owner

Good fix; I concur on all of the above.

@David-OConnor David-OConnor merged commit 7f11e6d into David-OConnor:main Dec 3, 2025
56 checks 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.

2 participants