Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpu/stm32/periph_adc: fix register access
The register access to SMPR1/SMPR2 was incorrect in three aspects: 1. For channels < 10, SMPR1 was cleared but SMPR2 should have been cleared 2. The code was not thread-safe 3. An unneeded write was issued. (The compiler won't combine the in-place bitwise operations into a single read-modify-write sequence on `volatile` memory.) Fixes #20261
- Loading branch information