SHARP Memory Display Breakout - 2.7" 400x240 with nrf52840

Hi,

I want to use SHARP Memory Display Breakout - 2.7" 400x240 with nrf52840 development kit. I have to interface the lvgl library for the graphics development but from the documentation, I could not figure out how to connect and there is no basic code for interfacing with the nordic SDK. Please suggest any type of reference for examples if available.

Any kind of input or help will be appreciated.

Thanks in Advance,

Parents
  • Muhammad said:
    Can you guide how I can find which pins are configured for the spi in a specific project?

    After building your project, in the nRF Connect tab, you may expand GPIO to the left in VS Code. However, using the code I uploaded, I was not able to see all pins shown in use as expected. I am assuming this has to do with some of the pins configured using the new Pin control functionality and some pins defined the classic way. I will look into this and get back to you.

  • Hi,

    Thanks for the reply. I have tried with the latest nrfConnect SDK and the following is the error when I open the sample application from the nrfConnect SDK and not a single change. It seems the sample is not compiling fine here.

  • Hi,

    Thanks for the reply. I have tried as you said above and tried after verification as well multiple times. But the results are the same as there is no display on the screen. Do you know what could be the reason?


    Also, currently, I am connecting Vin of lcd with DK 5v pin and v3.3 with VDD of DK. Do you think we need to provide the lcd a separate voltage source? if yes on which pin?

  • What is the voltage operating range specification of the display? What is the recommended operating voltage, and what is the IO voltage levels of the display?

    Muhammad said:
    Also, currently, I am connecting Vin of lcd with DK 5v pin and v3.3 with VDD of DK.

    If the LCD is powered with 5V, you might need to power the DK with a higher voltage as well, in order for the IO signals to match.

    The nRF52840 DK can be configured for 5V mode using the nRF power source switch on the DK. Set the switch to 'USB'.

    More details about this switch in the DK user guide.

    Muhammad said:
    But the results are the same as there is no display on the screen. Do you know what could be the reason?

    Are you still seeing '52', like the image below, or is the screen completely blank? Is the screen dark or bright? Does it change when you power it?

    Do you have access to any logic analyzer or oscilloscope? If so, you could check whether there is activity on the pins as expected.

  • Hi,

    After you have send me the updated pin configurations I can not now see the 52 on screen instead there are black lines on screen. I also have tried to give the 5V power to the screen but there were no results.

  • Is there any output to the terminal? The terminal could be outputting logs and error codes from the application.

    Did you check the pins to see whether there is any activity?

  • Hi,

    No there was no activity on the terminal and also I tried to debug. During the debugging the application seems to be running smooth and there were no exceptions or breakage.

    Also on the pins there was some activity and seems that data is going through it but not sure if its right or not.

    Is there any pin that we are missing to enable or attach?

Reply Children
    • Can you enable these Kconfigs to get some more log ouput
      • CONFIG_LOG=y
      • CONFIG_DISPLAY_LOG_LEVEL_DBG=y
    • Does the init function ls0xx_init() run successfully?
    • Can you attach a logic analyzer to the lines MOSI, MISO, SCK, CS, EXTCOMIN pin and DISPLAY pin? Upload the result here

    Best regards,

    Simon

  • Hi Simon,

    I have connected the logic analyzer to the spi pins and it seems the clock and spi pins are not working well in this case, I guess the spi initialization has some issue in code. Do you have any idea regarding this?

  • Thank you for the findings. Have you checked any of the other pins?

  • Yes, but the strange thing is there is no activity on these SPI pins? Do you know why this happens?

  • Could you please share the overlay file that was in use when you analyzed SPI?

    Does the overlay look anything like below? I realized &pinctrl might be missing. Please note that I have not tested the below overlay. I will try to do so later, although I do not have the physical display at hand.

    arduino_spi: &spi3 {
        compatible = "nordic,nrf-spim";
        status = "okay";
        cs-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>; /* D10 */
        pinctrl-0 = < &spi3_default >;
        pinctrl-1 = < &spi3_sleep >;
        pinctrl-names = "default", "sleep";
    
        ls0xx: ls0xx@0 {
            compatible = "sharp,ls0xx";
            label = "LS0XX";
            spi-max-frequency = <2000000>;
            reg = <0>;
            width = <400>;
            height = <240>;
            extcomin-gpios = <&arduino_header 9 GPIO_ACTIVE_HIGH>; /* D3 */
            extcomin-frequency = <60>; /* required if extcomin-gpios is defined */
            disp-en-gpios = <&arduino_header 10 GPIO_ACTIVE_HIGH>; /* D4 */
        };
    };
    
    &pinctrl {     
        spi3_default: &spi3_default {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 1, 15)>,  // D13
                        <NRF_PSEL(SPIM_MISO, 1, 14)>, // D12
                        <NRF_PSEL(SPIM_MOSI, 1, 13)>; // D11
            };
        };
    
        spi3_sleep: &spi3_sleep {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 1, 15)>,  // D13
                        <NRF_PSEL(SPIM_MISO, 1, 14)>, // D12
                        <NRF_PSEL(SPIM_MOSI, 1, 13)>; // D11
                low-power-enable;
            };
        };
    };

    Muhammad said:
    the strange thing is there is no activity on these SPI pins?

    Is the recording from directly after reset? The other pins are also of interest as it would be good to verify whether the pins are correctly set up. I suppose the Disp pin is might be critical as it enables the display.

Related