embassy
embassy copied to clipboard
stm32:`degrade_adc` drops `OpAmpInternalOutput` turning `opampen` off
The trait AdcChannel method degrade_adc consumes self, and in the case of op-amps causes set_opampen(false) to be called in Drop. When then sampling the internal line you get noise.
To work around this you can turn the opamp back on after degrading like so
embassy_stm32::pac::OPAMP1
.csr()
.modify(|w| w.set_opampen(true));
Already discussed in Matrix, this is just an issue to keep track and help others googling for it.