DevAcademy intermediate Lesson 5 Exercise 2 alternative RPi Display with nrf9161DK

I have been sitting with this problem for almost 2 weeks and have tried alot of different thing but without anything working,

Im using VS code with the nrf9161 and it has the version: "Manage toolchains v2.7.0 and "Manage west workspace v2.6.1"

Just compiling the code i get these warnings:

I want to implement the code with the 3.5Inch RPi Display, it uses different driver "ILI9486" which is not in zephyrs basic lib. 

What would i have to change in the current example to make it work or what part would i look into, to make it work?

Where im stuck:

Im not sure if im getting the the right output from pin 11, 12 and 13 (clk, mosi, miso) when using a logic analyzer:

Also the D/CX and CS should be on pin 10 and 15, but not getting any change of state when putting them into the logic analyzer

cs-gpios = < &arduino_header 0x10 0x1 >, < &arduino_header 0xa 0x1 >;
cmd-data-gpios = < &arduino_header 0xf 0x1 >;

The spec of the display:

Display 3.5 inch TFT LCD Touch Screen Monitor 480 x 320 for RPi with Touch PenFeatures:● The display has a resolution of 480 x 320, which is perfectly sufficient for small projects.

Resistive touch control.

● The display is compatible with RPi A, B, A+, B+, 2B, 3B, 3B+, 4B.

● GPIO pins remain free to address other devices.

Driver provided (works directly with your own Raspbian/Ubuntu).

Supports RP-bian system, Ubuntu system, Kali Linux system.LCD type: TFT.

LCD interface: SPI (Fmax: 32 MHz)

Touch screen type: resistor.

Touchscreen controller: xpt2046.

Colours: 65536.

Driver IC: ILI9486.

Backlight: LED.

Resolution: 320 x 480 (pixels).

Backlight current: 120mA

Power dissipation: 0.13 A x 5 V.

Active area: 48.96x73.44 (mm)

Product size: 85.42 x 55.60 mm.

Package size: 118 x 72 x 34 mm.

Coarse weight (package includes): 75 (g)Box contents:

1 x 3.5 inch touch screen for RPi.

1 x touch pen.

 

  • Hi,

     

    Could you .zip the saleae logic file and share it here?

    In the picture that you attached yesterday:

     

    There are toggling on the MISO line, but with the resolution of the image, it is hard to say what is happening.

    EgilCL said:
    Should there be conflicting pin from this exercise?

    There can be an issue if you use the button. Ensure that CONFIG_DK_LIBRARY=n.

     

    Is there any runtime logging that is printed when you run the firmware?

     

    Are you using ncs v2.7.0 or v2.6.2? In v2.7.0, which is based on zephyr 3.6, the way to populate a display has changed:

    https://github.com/nrfconnect/sdk-zephyr/blob/v3.6.99-ncs2/doc/releases/migration-guide-3.6.rst#display

     

    Kind regards,

    Håkon

  • nrf9161DK_SPI_Display.zip

    * The saleae logic file output is with custom gpios for CS and CMD.

    *I put "CONFIG_DK_LIBRARY=n" into the prj.conf but it still shows the conflict between pins.

    *I changed to v2.61, but with no difference for now.

    *Im still fairly new to the nrf and vscode, so im unsure how to get the logs? here are the output from the terminal:

  • Hi,

     

    The trace does not show any activity on the MISO (master in - slave out) line, which the display should use to respond to the nRF host. 

    EgilCL said:
    Im still fairly new to the nrf and vscode, so im unsure how to get the logs? here are the output from the terminal:

    Logs are by default outputted on the UART. You can open up your favorite terminal (putty, teraterm, nrf serial etc) and connect to the COM-port with 115200 baud rate, and you should get a log output.

     

    EgilCL said:
    *I put "CONFIG_DK_LIBRARY=n" into the prj.conf but it still shows the conflict between pins.

    vscode will warn you about the conflict, as the devicetree entires do indeed conflict, but if you do not use the LEDs/Buttons, the GPIOs will be unused.

     

    Have you checked the datasheet of your display driver to see if this is compatible with the ilitek9340?

     

    Kind regards,

    Håkon

Related