2017-06-13 03:32 AM
I'm trying to read an external ADC output.
The data are provided thru a DRDY pin.
When the DRDY falls, it generates an interruption in my STM32L1 (falling edge). Then, I must read the DRDY level eevery rising edge of a clock provide by the STM32L1 to the ADC.
Sould I configure the EXTI pin (PA3) in the callback function as input mode everytime the interrumption happens? (and then, before exiting to re-configure as EXTI)
2017-06-13 04:21 AM
As long as an GPIO is not in analog mode, IDR always reflects to logic level at the pin. So no need to redefine.
2017-06-13 06:14 AM
Thanks Uwe. It's OK. The problem was in the protocol towards the external ADC
2017-06-13 08:25 AM
2-wire serial interface? like this?
Should I configure the EXTI pin (PA3) in the callback function as input mode everytime the interruption happens? (and then, before exiting to re-configure as EXTI)
You can try that, I think it will work.
2017-06-13 09:34 AM
I'd like to know the how the external ADC works? it's an IC? what's its name?
2017-06-13 09:42 AM
It's an external Sigma-Delta 24 bits ADC
2017-06-13 10:33 AM
Finally, it is not needed to reconfigure PA3
But I think that everytime DRDY falls during DOUT Mode, the interruption begins again.
Should I disable the interruption during DOUT Mode?