Unable to enable internal pullDown in some pins like PB_12 and PA_10

I’m using Mbed OS and trying to enable an interrupt on pin PB_12 for a reed switch.

#define reed_pin PB_12

InterruptIn reed(reed_pin,PullDown);

I’ve configured the interrupt pin to use internal pullDown, but the pin’s voltage seems to be floating for PB_12, always VCC for PA_10, but curiously, it works property with PA_0.

¿Is there something connected to pins PB_12 or PA_10 in RAK3172 that prevent the use of internal pulldown?

Thanks

Hello @jfmateos

Are you sure it is PB_12 floating and PA_10 VCC and not the other way around?

PB12 has a pullup to VCC inside the module. For PA_10, I am not sure, it is a combined ADC/DAC/GPIO pin. Could be that it cannot be programmed with internal pullup because of the ADC/DAC functionality

Thanks @beegee
I will recheck it tomorrow.
Where could I find the schematic to see that pullup resistor on PB12?

Kins regards from Madrid

Schematics of our WisDuo modules are not made public.

I am still talking with R&D about the other pin, PA_10.

Thank you very much @beegee

My problem is that I am designing a custom board based on RAK3172 (with no additional microcontroller) and I need to connect digital/analog/interrupt inputs to it.

I have tested all the available pins and none of them gives the expected value for all internal pullup/pulldown configurations (except perhaps PB_3 that has an odd 0.11V as interrupt pulldown, and PA_0 that cannot be properly tested because I already have circuitery connected to it).

imagen

The PB_12 results are consistent with the PullUp resistor you commented before.
I don’t need the schematic, just need to know what other connections have these pins inside the Rak3172 module.

Kind regards

More information

PA_10 didn’t get the pullDown configuration with InterruptIn using the Mbed example (mbed-os-example-lorawan) as shown in the table above, but it works with a simpler program (see below), so there must be something in the mbed example inpacting that pin

#include "mbed.h"


InterruptIn reed(PA_10,PullDown);

 
int main() {
    while(true){
        
        ThisThread::sleep_for(1s);
        
    }  
}

The problem with PA_10 not entering PullDown configuration in InterruptIn was this line:
imagen
After removing it, the Interrupt is working properly.
I will try to further investigate interrupt behaviour in other pins.

For the IO pins of RAK3172, except PB12, all pins of the stamp module are directly connected to the STM32WL5 chip, no pull-ups or pull-downs attached to them.

I have no experience with Mbed OS, so I do not know how it does the setup of the GPIO’s.

Thank you very much @beegee
That’s a very valuable information.
Kind regards.