BBC microbit v2, Zephyr: only the "ring" edge connectors are controllable

Working on a BBC microbit v2 (nRF52833) with Zephyr, I can only control the "ring" pins of the microbit's edge connector. I can setup pullup or pulldown on the other pins too, but I cannot change their state. The function calls return no errors. I got through all library calls etc, through gdb, down to writing to OUTSET/CLR GPIO registers and there is no difference whether I use a "ring" pin or any other.

I don't think this is a hardware problem of the Microbit  or the edge connector (kittronic): if I don't add the PULLUP flag, I get 0V on the pin, but with the flag I do get 3.3V. I've also tried connecting the scope directly on the microbit (not through the edge connector) and the behaviour is the same. I've also tried other, non "ring" pins, and I get the same behaviour.

The only thing I have not been able to do is to dump the GPIO registers (and those of GPIOTE, as the nRF52833 product spec mentions that is a pin is configured to be controlled by GPIOTE, all writes to GPIO regs are ignored). GDB (using just west debug with the default pyOCD) does not let me do "x/" at these addresses.

To give you a more concrete example, here's is my code based on the samples/basic/blinky example of zephyr, with a twist (just a dts overlay defining leds) to make it work on the bbc microbit v2: not really blinking an actual led but driving an edge connector pin on and off, which I can observe with a scope.

Do you have any thoughts on what I am missing?
Thanks,
Ares

My dts overlay file is:

/ {
  aliases {
    led0 = &led0;
  };
  leds {
    compatible = "gpio-leds";
    led0: led_0 {
      /* gpios = < &gpio 2 0 >; // this is the P0 edge ring */
      gpios = < &gpio 10 (GPIO_ACTIVE_HIGH|GPIO_PULL_UP) >; /* This is P8 of the edge connector.pullup works */
    };
  };
};

and the main.c is

#include <zephyr/zephyr.h>
#include <zephyr/drivers/gpio.h>


/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS   1000

/* The devicetree node identifier for the "led0" alias. */
#define LED0_NODE DT_ALIAS(led0)

/*
 * A build error on this line means your board is unsupported.
 * See the sample documentation for information on how to fix this.
 */
static const struct gpio_dt_spec led_0 = GPIO_DT_SPEC_GET(LED0_NODE, gpios);

void main(void)
{
	int ret;

	if (!device_is_ready(led_0.port)) {
		return;
	}

	ret = gpio_pin_configure_dt(&led_0, GPIO_OUTPUT);
	if (ret < 0) {
		return;
	}

	while (1) {
		//ret = gpio_pin_toggle_dt(&led);
		ret = gpio_pin_set_dt(&led_0, 1);
		if (ret < 0) {
			return;
		}
		k_msleep(SLEEP_TIME_MS);
		ret = gpio_pin_set_dt(&led_0, 0);
		k_msleep(SLEEP_TIME_MS);
	}
}

Related