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 Reply Children
  • 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.

  • Sorry, something is wrong with the latest device tree. I will update this shortly.

  • Please try the following overlay:

    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;
            };
        };
    };

    I have now tested this overlay and I am able to see activity on all pins.

  • Attached is the code that I tested, with the updated overlay:
    20221101-lvgl.zip

  • I assume the original poster left after finding a solution. Re: footnotes on page 8 of the LS027 datasheet, EXTMODE should be connected differently based on the state of EXCOMIN, and DISP determines if the display is on. I'm not sure if this is a problem related to some configuration used in that zipped project, an error with Zephyr's Sharp driver/shield, or a misunderstanding on my part, but the DISP pin is only ever briefly toggled after startup (see below, channel 1).

    This issue is solved specifically on the Adafruit breakout by disconnecting EXTMODE, EXCOMIN, and DISP altogether, as recommended in their user guide. Unfortunately I have no more information to provide for users in the future who may not be using the breakout, maybe I'll revisit this at some point once I've completed my project but for the time being the zip you posted does work properly and displays "Hello World" along with an incrementing counter at the bottom.

    Helsing, I really appreciate you having taken the time to help solve this problem with the poster. I was working on the same bringup process this week (Adafruit breakout for the LS027 + nRF52840 DK) and I hit a stuck point on Zephyr configurations before I found this thread, but the info and files provided here were enormously helpful in guiding me through.

Related