cancel
Showing results for 
Search instead for 
Did you mean: 

STML433 ADC1 coexist with other GPIO

YKuo.1
Associate II

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


_legacyfs_online_stmicro_images_0693W00000bkL9JQAU.png
_legacyfs_online_stmicro_images_0693W00000bkL9dQAE.png

1 ACCEPTED SOLUTION

Accepted Solutions

Short between the pins?

JW

View solution in original post

3 REPLIES 3

Short between the pins?

JW

S.Ma
Principal

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.

YKuo.1
Associate II

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.