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,

    • 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