Hi folks. For some months now, I've been trying to get a small LCD based on the Sitronix ST7701S working with the BeagleBone Black. Because the Linux kernel only includes a MIPI DSI driver for the ST7701 (which is similar but not identical), I wrote my own SPI driver in Rust. It's open-source, available here: https://github.com/ironblock/ST7701S-SPI-Driver
My problem is that no matter what kind of image I try and display, the output is garbled. I see no distinct pixel color values across an entire column (or maybe they're lines? I'm not sure which way is up).
I've connected it using the 16-bit pinmux, since that seemed "safest". My SPI commands work, and doing things like "turn all pixels on", "turn all pixels off", "invert colors", etc. all work as expected, but the image is never clear.
I put 33R resistors on the data lines in case there was some kind of reflection or interference that was causing the problem.
I'm currently powering the LCD driver from P9.3 (VDD 3.3v). The Sitronix data sheet indicates that this is allowed, but the LCD vendor's data sheet says 2.8v±0.3v. So, maybe I'm over-volting it?
The vendor tells me that the display should be set to 480x480@60Hz. Using other resolutions like standard VGA shifts the garbled image as though the porches were being respected.
The GitHub contains the dts and uEnv.txt files (or I can copy them here, if linking out is disallowed in this group).
I appreciate any insight anyone may have. I'm honestly not sure what else to try. As a disclaimer, I'm new to both Rust and hardware development, so there's a lot I don't know.
I'm happy to answer any questions or provide any additional information.
fim to render a pure white png produces this:
The OS is Debian Stretch 9.5 IoT from the Beaglebone website.
The display is connected as per the normal
The chosen resolution is 480x480@60Hz. I've also tried the CVT RB and CVT RBv2 variants of standard VGA (640x480@60Hz, which should be supported by the ST7701S), and the results are the same, just shifted on the display. All tested configurations are visible in the device tree overlay.
fim to display other test images produces similar results. My pure black png is dark, a color test pattern produces some green effects, etc.
Testing the signal lines with a logic analyzer shows the expected values when sampling the MSB for each color. An excellent example is using a test image like this:
When zoomed to the level of a single frame, everything looks correct, like the datasheet. DE, VSYNC, and HSYNC polarity look good and correct. The VSYNC refresh rate tested at 59.97hz, which should be appropriate for the display.
When I zoom in to look at the timings for each line, everything also looks correct, and you can see the white and black pattern for each line in the MSB values. My logic analyzer can only sample as fast as 24MS/s, which does not accurately capture the pixel clock (which is was set to 16.15MHz for this test).
Here is the exact hardware setup I'm using:
|LED ANODE||+12.8v||DC PSU +||--|
|LED CATHODE||GND||DC PSU -||--|
|LED CATHODE||GND||DC PSU -||--|
|SPI Data signal|
|SPI Clock signal|
|SPI Chip select signal|
|RGB dot clock signal|
|RGB data enable signal|
|RGB frame synchronizing signal|
|RGB line synchronizing signal|