cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L031 reading 5 digital Inputs work fine, but doing the same with 10 inputs fail.

Hugo Balette
Associate II
Posted on November 16, 2017 at 11:32

Hi !

I'm working on a STM32L031 project, and I need to read 10 digital 0V-3v3 Inputs.

Everything works fine if i'm reading 5 inputs (PA3, PA4, PA5, PA6, PA7). It is also working if I'm reading 5 other inputs (PB3, PB4, PB5, PB6, PB7).

But as soon as I plug both PA3, PA4, PA5, PA6, PA7 and PB3, PB4, PB5, PB6, PB7, it stops working.

I checked using a voltmetre in the 10 inputs config, and 4 inputs don't rise to 3v3, but only 1V.

So It only reads 3 inputs of (PA3, PA4, PA5, PA6, PA7) and 3 inputs of (PB3, PB4, PB5, PB6, PB7).

Would it be a problem of current sinking ? or just a wrong software configuration ?

I tried configuring inputs with and without pull down.

I checked GND is common to every inputs.

Any ideas ?

thanks for your time.

Hugo

#current-sink #digital-input #stm32l0 #3v3
10 REPLIES 10
Posted on November 16, 2017 at 13:15

Have you checked that the corresponding bit for port B in the GPIO clock enable register (RCC_IOPENR) is set ?

A 100% faith in Cube-generated code is not always warranted ...

And, of course, check that the pins are not physically hooked to external, interfering circuitry.