Hi, I have an Adafruit nRF52840 Feather Express and am developing for it using Zephyr 3.1.1 and the nRF Connect SDK with VS Code.
I want to read and write from two of the GPIO pins via UART but am struggling with setting this up. My understanding of DTS files is a little fuzzy tbh. I've looked at the board DTS file (zephyr\boards\adafruit\feather_nrf52840\adafruit_feather_nrf52840.dts) but it has very little in it, specifically the following:
/*
* Copyright (c) 2020 Tobias Svehagen
* Copyright (c) 2024 Jacob Winther
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
#include <nordic/nrf52840_partition.dtsi>
/ {
model = "Adafruit Feather nRF52840 Express";
compatible = "adafruit,feather-nrf52840";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
};
leds {
led0: led_0 {
gpios = <&gpio1 15 0>;
};
};
};
The pin I want to write to is GPIO p0.25 as shown on this page: https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/pinouts
What do I need to do to make the pin accessible from my C code? Put something in a DTS overlay file?
I'd very much appreciate some guidance with this. I've worked with other boards successfully in the past but for some reason am finding it hard to get started here. The only examples I can find involve the Blinky sample which flashes led0 which is defined in the DTS file. Is the DTS file for the board basically incomplete?
Thanks in anticipation