Does the new version of firmware modify the rgb565 image data format?

I’ve been using version 3.6.7 with my LCD screen and it works. I recently updated to the latest version of the firmware, and then the LCD display became strange. After the test, it is found that the pixels correspond one by one, but it seems that the RGB color order is wrong. I changed the LCD setting to BGR instead of RGB, but it’s still not right. Have you changed the data format of rgb565 image?

My LCD screen is 320 * 240 resolution, with driver chip st7789,by SPI port

Hi, the LCD driver was re-written to directly output the RGB565 pixel data. Previously, pixel data was byte reversed in RAM so we had to byte un-reverse it before outputting it. However, externally to the STM32 the pixel order should look the same.

If you had RGB565 byte reversal issues the image would look completely insane. Assuming the color looks just wrong… this implies it’s another issue. You should look into the registers programmed on the st7789. Check the color mapping registers. The RGB565 data input to the screen should be right.

thank you! I solved it! I used to write my own driver for LCD. It works well in the old version of firmware, but not in the new version. Now, I use the LCD driver that comes with the firmware, and it works.

But I also found two problems. The LCD driver in the firmware can’t set the display direction.The pixel width is fixed at 240, and can’t be found modes keyword like lcd.QVGA.I wrote an additional SPI command for LCD, to change its direction and width, to solve it.I hope it can be repaired.

Hi, you just set the x/y pixel count. If you want 240 width then use x of 240.

If you are trying to use a display that’s 240x320 then it’s not a 320x240 display. Our driver doesn’t handle rotation of a display like this.