cancel
Showing results for 
Search instead for 
Did you mean: 

ADC takes over function of every ADC pin when enabled?

Daniel S
Associate II
Posted on December 22, 2016 at 08:25

When I enable the ADC on my STM8A6266 MCU every PIN which is a ADC channel is blocked by the ADC? 

For example:

PIN1-PIN8 are ADC channels 1-8, I enable the ADC and doing conversions on ADC channel 1 then I can't use PIN2 (ADC_channel 2) for EXTI interrupt? Tried it several times also with polling but it seems when the ADC is enabled it takes over the function of every PIN which is associated with the ADC. So even reading  input GPIO value isn't possible when ADC enabled.

Couldn't find any comment regarding this in the datasheet or reference manual.

1 REPLY 1
Seb
ST Employee
Posted on December 30, 2016 at 13:48

As a user of STM8L151, I would say that each GPIO pin can be configured as analog xor digital (with interrupt capability)

It should be possible to dynamically turn an EXTI pin into analog mode for ADC conversion then restore it back to digital mode.

EXTI is referring to a digital input pin (probably in some cases with hysteresis for noise filtering)