RAK811 breakout board GPIO questions

Hi,
I’m trying to use the at+get_config=device:gpio:X to read a GPIO pin.
I’m assuming that the command will initialize the GPIO as input by default. Cold you please confirm ?
What’s the default for the GPIO pins ? Open-drain/pull-up/pull-down ? I’d think open-drain as multiple readings on the same pin give random 0/1 results.
Another issue is that I can’t find a mapping between the parameter of the AT command and the GPIO pin number as described on the breakout board.
The only one that seemed to work was at+get_config=device:gpio:23 that was reading PB14, PIN 11 on the diagram.

Thanks

The default GPIO pins is pull-down. gpio:2—>PB12,gpio:3—>PB14,gpio:4—>PB15. it is related to the rak811 module.

Thanks,
I’m assuming that when you say GPIO3 you refer to the value I’d use in the AT command, right ?
As you can see, multiple reads give different values, if the pin was configured with pull-down, I’d expect to be always 0

at+get_config=device:gpio:3
Pin level is:1
OK
at+get_config=device:gpio:3
Pin level is:0
OK
at+get_config=device:gpio:3
Pin level is:1
OK
at+get_config=device:gpio:3
Pin level is:1
OK
at+get_config=device:gpio:3
Pin level is:1
OK
at+get_config=device:gpio:3
Pin level is:1
OK
at+get_config=device:gpio:3
Pin level is:1
OK
at+get_config=device:gpio:3
Pin level is:0
OK
at+get_config=device:gpio:3
Pin level is:1
OK

Also, PB14, on the breakout board positioned in the lower right corner, for me works when using the following: at+set_config=device:gpio:23:0

Hi@saltar
GPIO read default set PIN_OPEN_DRAIN.
Please check the external circuit of the lower pin 3.

Thanks Leopold, that matches what I’ve tested.
What about the pin mapping ? I’m still confused.

Sal

at+get_config=device:gpio:X X means pin number of the RAK811 module.
the pin mapping checkout this link :https://doc.rakwireless.com/datasheet/rakproducts/pin-definition—rak811-lora-module

Thanks Leopold,
I did verify one more time, and the issue is with the pinout description on the breakout board.

This is what I could verify on the board and validated all pins


In green, the rak811 module pinout. The ones with red border are not accepted by the RUI at commands (RUI_AT_PARAMETER_INVALID_2)

How did you get the following picture, and can you take a screenshot to explain the problem when the pin in the red box cannot receive AT command?

Nicholas,
the first picture is from your documentation: https://doc.rakwireless.com/rak811-lora---breakout-module/burning-bootloader-into-the-device
The second one, I did draw myself.

As for the errors, that’s what I get
at+set_config=device:gpio:13:0
ERROR: RUI_AT_PARAMETER_INVALID 2
at+set_config=device:gpio:10:0
ERROR: RUI_AT_PARAMETER_INVALID 2

while it works fine for the others

at+set_config=device:gpio:9:0
OK
at+set_config=device:gpio:4:0
OK
at+set_config=device:gpio:20:0
OK
at+set_config=device:gpio:5:0
OK
at+set_config=device:gpio:8:0
OK
at+set_config=device:gpio:3:0
OK
at+set_config=device:gpio:2:0
OK
at+set_config=device:gpio:15:0
OK
at+set_config=device:gpio:16:0
OK
at+set_config=device:gpio:14:0
OK

Hi @saltar
Pin number 10 an 13 are used to SWD interface,so they can’t be used to GPIO.

Thanks Leopold.
I’d suggest you guys update the documentation on the breakout board and the default GPIO status of PIN_OPEN_DRAIN.
I’d also suggest to add the capability of configuring the GPIO inputs with an internal pull-up.