2023-05-17 09:06 PM - edited 2023-11-20 05:10 AM
Hi,
I working with STM32L433's ADC, and I'm having a problem where the ADC CH11 couldn't coexist with other GPIOs. I'm using a resistor divider from a battery and feeding into ADC1 CH11 (PA6, pin16). If the PA5 is left in a reset state, it all works. However, if I configure PA5 as an output, it seems to change PA6 as well. The voltage level no longer holds at the divided value, it becomes the PA5's level instead.
I nail down to single command that causes this, which is setting the output mode of PA5. (changes 0x48000000 from default state to output). I think I probably do something wrong, any suggestions?
Thanks,
here is my IOC configuration
Solved! Go to Solution.
2023-05-18 01:23 PM
2023-05-18 01:23 PM
Short between the pins?
JW
2023-05-19 06:05 AM
First remember the ADC behaves as a time switched 2kOhm 5 pF RC filter. You will need to put at least en external cap to avoid voltage droops when converting. Check on the oscilloscope to confirm.
Some STM32 have 3.3V not 5V tolerant pins whic have analog function. Check yours.
And the resistor divider should be big enough not to drain the supply source, nor affect the power up/down slopes too much.
2023-05-23 09:04 PM
Thanks to both of you. Turns out the issue was my poor soldering job. The surface wasn't clean enough. My best guess is the flux is somewhat conducting. After wiping out all the debris, it works as expected.