Re: NRF52832 and GPIO #gpio #nrf52832


Hi, No MCUBoot.

And yes, the board boots correctly and I can use GDB to debug.

I can see the GPIO driver calls, the values that are set and so on.

My prj.conf file is as simple as it can get: CONFIG_GPIO=y nothing else.

If I flash for example the BT beacon example, it works fine, so  not probably not an issue with the board. I've tried anything more complex, since I'm stuck with the simpler case :)

An example of the debug session:

84                      gpio_pin_set(gpio_dev, led->gpio_pin, 1);
(gdb) s
gpio_pin_set (port=port@entry=0x20000034 <__device_gpio_nrfx_p0>, pin=5 '\005', value=1) at 
1005            if (data->invert & (gpio_port_pins_t)BIT(pin)) {
(gdb) s
1006                    value = (value != 0) ? 0 : 1;
(gdb) s
1009            return gpio_pin_set_raw(port, pin, value);
(gdb) s
gpio_pin_set_raw (value=0, pin=<optimized out>, port=0x20000034 <__device_gpio_nrfx_p0>) at /mnt/study/ZephyrRTOS/zephyrproject/zephyr/include/drivers/gpio.h:1009
1009            return gpio_pin_set_raw(port, pin, value);
(gdb) s
z_impl_gpio_port_clear_bits_raw (pins=32, port=0x20000034 <__device_gpio_nrfx_p0>) at 
784             return api->port_clear_bits_raw(port, pins);
(gdb) p port
$2 = (const struct device *) 0x20000034 <__device_gpio_nrfx_p0>
(gdb) p *port
$3 = {name = 0x3630 "GPIO_0", config = 0x360c <gpio_nrfx_p0_cfg>, api = 0x35e8 <gpio_nrfx_drv_api_funcs>, data = 0x200001bc <gpio_nrfx_p0_data>}
(gdb) p pins
$4 = 32
(gdb) s

Join to automatically receive all group messages.