How do I properly configure the GPIO for pins 0, 1, 9, 10, 11, and 21 on the nRF52-DK?

I would like to use the oscillator pins (if possible), NFC pins, and pin 11/21 as GPIO. I can see why 0,1,9,10 would not work but I am confused why 11 and 21 do not. Every other GPIO (except UART stuff) works fine.

21 is dully on at all times as above and 11 is not on or responsive at all. 

For NFC pins, CONFIG_NFCT_PINS_AS_GPIOS=y does not work by itself.

For the oscillator pins I tried,

CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
and that does not work. (Is this functionality even possible with the dev kit?)
Below is the code i'm using attempting to blink the LED with these GPIO:

	mux_gpio_dev = device_get_binding("GPIO_0");
    gpio_pin_configure(mux_gpio_dev, 10, GPIO_OUTPUT | GPIO_ACTIVE_HIGH);
	gpio_pin_configure(mux_gpio_dev, 9, GPIO_OUTPUT | GPIO_ACTIVE_HIGH);
	gpio_pin_configure(mux_gpio_dev, 21, GPIO_OUTPUT | GPIO_ACTIVE_HIGH);
	gpio_pin_configure(mux_gpio_dev, 11, GPIO_OUTPUT | GPIO_ACTIVE_HIGH);
	gpio_pin_configure(mux_gpio_dev, 0, GPIO_OUTPUT | GPIO_ACTIVE_HIGH);
	gpio_pin_configure(mux_gpio_dev, 1, GPIO_OUTPUT | GPIO_ACTIVE_HIGH);

	for(;;) {
		gpio_pin_set(mux_gpio_dev, 10, 1);
		gpio_pin_set(mux_gpio_dev, 9, 1);
		gpio_pin_set(mux_gpio_dev, 21, 1);
		gpio_pin_set(mux_gpio_dev, 11, 1);
		gpio_pin_set(mux_gpio_dev, 0, 1);
		gpio_pin_set(mux_gpio_dev, 1, 1);
		k_sleep(K_MSEC(500));
		gpio_pin_set(mux_gpio_dev, 10, 0);
		gpio_pin_set(mux_gpio_dev, 9, 0);
		gpio_pin_set(mux_gpio_dev, 21, 0);
		gpio_pin_set(mux_gpio_dev, 11, 0);
		gpio_pin_set(mux_gpio_dev, 0, 0);
		gpio_pin_set(mux_gpio_dev, 1, 0);
		k_sleep(K_MSEC(500));
	}

Parents Reply Children
Related