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?
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
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).
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.
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
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.