Working with Adafruit 2.8" capacitive touch display not working with nRF9160-DK

Hi,

I am working with an Adafruit display 2.8" capacitive. The display is working when I flash lvgl sample and hat attached to nRF52840-dk. But it does not work with nRF9160-DK.

I changed some of the required pins in the device tree of the board. The configurations are as follows in the boards directory of nRF9160-DK

arduino_spi: &spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
};

Inside the pin control file, it looks like the following.

spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 11)>,
<NRF_PSEL(SPIM_MISO, 0, 12)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 11)>,
<NRF_PSEL(SPIM_MISO, 0, 12)>;
low-power-enable;
};
};

https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2/connecting

Then I also looked at the shields field. There is the following configuration for the device arduino_spi.

Which should work in my undestanding. 

&arduino_spi {

status = "okay";
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>, /* D10 */
<&arduino_header 10 GPIO_ACTIVE_LOW>; /* D04 */


ili9340: ili9340@0 {
compatible = "ilitek,ili9340";
label = "ILI9340";
spi-max-frequency = <15151515>;
reg = <0>;
cmd-data-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
width = <320>;
height = <240>;
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB888>;
rotation = <90>;
frmctr1 = [00 18];
pwctrl1 = [23 00];
vmctrl1 = [3e 28];
vmctrl2 = [86];
pgamctrl = [0f 31 2b 0c 0e 08 4e f1 37 07 10 03 0e 09 00];
ngamctrl = [00 0e 14 03 11 07 31 c1 48 08 0f 0c 31 36 0f];
};

sdhc0: sdhc@1 {
compatible = "zephyr,mmc-spi-slot";
reg = <1>;
status = "okay";
label = "SDHC0";
spi-max-frequency = <24000000>;
};
};

What I am not sure is that could be that there is nRF52840 SoC on this board which is used for various board control and pin control functions. So maybe that could be missing.

Parents Reply
  • Hi Runar,

    I do not have VS code installed with all the required things for dubugging. It works but it breaks in the meantime. Also, regarding the overlay file, I have updated the corresponding .dts files in /arm/boards directory of my Zephyr installation.

    I normally use command line to flash to the board, with -- -DSHILD option selected while building.

    So for debugging I recently download the Ozone for that, and could set breakpoints and see all other debug functionalities. The Code works normally with "CPU running" status and do not show any error.

    I do not know yet...I am relatively new to debugging with software.

Children
Related