The implementation should call alternate with the GPIO alternate value so the pad can operate as an ADC input. Not setting the alternate can lead to pad reconfiguration issues, like this one.
Hard-coding alternate 5should work. But ideally, we base the alternate on what the GPIO implementation supplies.
Most
prepare
calls set an alternate value to fully prepare the pin. But this call is missing inadc::prepare
.https://github.com/imxrt-rs/imxrt-iomuxc/blob/f7438338ec520d2380e548e76caf6cc303a0b20c/src/adc.rs#L21-L31
The implementation should call
alternate
with the GPIO alternate value so the pad can operate as an ADC input. Not setting the alternate can lead to pad reconfiguration issues, like this one.Hard-coding alternate
5
should work. But ideally, we base the alternate on what the GPIO implementation supplies.