Page 1 of 1

ADC not working on L4

Posted: Thu Jun 02, 2016 11:23 pm
by mbrej
Hi all, I am trying to get the ADC working on a L4 board.

As a simple test, I have tried running the code pyb.ADC(17).read() which should read the internal temperature sensor and return ~1600, but instead 0 is returned.

I have also tried reading the value of a pin, but this also returned zero. I had to add ,ADC12_INx to the appropriate lines in stm32l476_af.csv to get this to work though.

Any ideas?

Thanks, Matt

Re: ADC not working on L4

Posted: Fri Jun 03, 2016 1:37 am
by shaoziyang
Yes, it is not work in STM32F7DISC too.

Re: ADC not working on L4

Posted: Thu Jul 14, 2016 10:44 pm
by mbrej
Ive made a little progress on this: https://github.com/micropython/micropython/issues/2243

Re: ADC not working on L4

Posted: Tue Jul 19, 2016 12:43 pm
by badi
Hi

I created a pull request #2252 for fixing this issue.
It would be great if you could test this fix by checking out and compiling l4_adc_bug branch of my repo
https://github.com/tobbad/micropython/tree/l4_adc_bug
If the fix works on your device too, please add some kind of "OK" to Issue #2252.