2024-02-07 06:53 AM - edited 2024-02-13 08:32 AM
Unfortunately the screen on the STM32H735G-DK is configured upside down by default leading to a horrible viewing angle when the display is on a desk. Beyond 45 degrees the screen becomes unreadable (colors become inverted). In the other 3 directions the viewing angle is very good.
It's not possible to do this in TouchGFX or in software without a serious performance penalty. But I was wondering if I could configure the display driver chip to flip X and Y axis.
According to the schematic of MB1315A the default slave address of the driver chip (RK043FN48H-CT672B) is 0x70 (8-bit notation), I can communicate with this address over I2C4. I also get a response on address 0x34 (8-bit notation), which is the Audio codec.
In a datasheet of a different driver chip I found on this forum(OTA5180A) register R0: Direction setting is mentioned. I assume this is for mirroring and rotating 180 degrees. The OTA5180A chip uses SPI with mislabeled I2C pins. But the RK043FN48H-CT672B doesn't have a chip select so I stick to I2C. I tried writing a value of 0x00 to register 0x00 to clear the Hdir and Vdir, but there is no difference. I was thinking that perhaps TouchGFX overwrites these values in the hidden library code for the Touch driver, but after disabling touch code I noticed nothing changed. All registers read as 0x00 and sometimes all as 0xFF.
Can someone confirm whether this driver chip supports rotating 180 degrees and, if so, how I can enable this?
I already figured out how to do it with the MDMA (from the MDMA_RepeatBlock_Rotation example, 180 degrees), I just want to know if this can be avoided. I'd also like to know where I can call the MDMA code in a TouchGFX application (HAL_LTDC_LineEventCallback?). And how I can use MDMA with 24-bit color mode since it only supports even powers of two for bytes (perhaps combining it with the DMA2D to convert it to 32-bit first?)