Giter Club home page Giter Club logo

Comments (6)

notro avatar notro commented on August 23, 2024

You need to find the initialization sequence that matches your display. This is usually found inside the accompanying example code, which seems to missing here. The display is listed as a MSP2402/MSP2401 and there's a wiki for that: http://www.lcdwiki.com/2.4inch_SPI_Module_ILI9341_SKU:MSP2402
Here it's listed as having a ili9341, but this might have changed in newer batches.

I suggest you contact the seller to get some example code or the init sequence.

Here's the init sequence for the driver you are using: https://elixir.bootlin.com/linux/latest/source/drivers/staging/fbtft/fb_st7789v.c#L143

from fbtft.

mountainstorm avatar mountainstorm commented on August 23, 2024

Is there an example dtoverlay which "just" sets the init sequence which I can crib from when I figure out what it is?

from fbtft.

notro avatar notro commented on August 23, 2024

See here for writing an overlay that overrides the init sequence: https://github.com/notro/fbtft/wiki/FBTFT-RPI-overlays

from fbtft.

mountainstorm avatar mountainstorm commented on August 23, 2024

hmm, I'm at a loss. If I write an overlay, regardless of how much/little I put in it the config described above stops working i.e. if I have both loaded with dtoverlay=. I've then tried fleshing out my overlay on the basis that I should be able to get it to the same state as the dtoverlay=fbtft,st7789v line (above) i.e. inverted colours, and then work on the init sequence. Unfortunately that doesn't seem to work; and I just get an empty screen with the backlight on.

This (custom.dts) seems like it should work but doesn't; though all the ones I cribbed off also seemed ok and they didn't work either.

I did find this works-but-wrong-res.dts which also kind of works, with this one the colors are good but the resolution is all messed up - probably because that's using the wrong controller (it's the st7735)

Any ideas/pointers to at least get an overlay equivalent of the dtoverlay=fbtft,st7789v line would be greatly appreciated. The data sheet has an invert command so adding that as part of init seems like it should be easy enough once something is working.

custom.dts.txt
works-but-wrong-res.dts.txt

from fbtft.

mountainstorm avatar mountainstorm commented on August 23, 2024

oh actually, the overlay here seems to achieve that i.e. everything works except it's inverted. I tried this hours ago but must have had some other config broken, now I've fixed those problems I tweak the pinout and that works https://github.com/darrenliew96/gamepi20_drivers/blob/main/gamepi20.dts

from fbtft.

mountainstorm avatar mountainstorm commented on August 23, 2024

haha, victory. Looking at the data sheet the invert command is 21h and the init sequence there includes 0x1000021; remove that line 5th line in the init sequence and bingo, colors the right way round.

Uploading here for posterity and anyone in the future with this issue
gamepi20.dts.txt

from fbtft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.