2021-11-22 01:46 PM
I'm having an issue with my framebuffer generated by TouchGFX. Source code is not provided for this section of the engine. Due to constraints of the STM32F4 I can only write to my external SDRAM in 32 bit words. However the touchgfx::LCD24bpp::fillBuffer wants to write it with 8 and 16 bit pointer pointers. My TFT display is an RGB888. Is there a hook or some other thing I might be missing? Thanks for any help.
2021-11-22 02:02 PM
Try explain more, why you fill , how is trouble?
2021-11-23 04:14 AM
First I am porting to TouchGFX from an emWin design which has been in use for a couple of years. The current hardware works and there is little chance to be able to change hardware on a design that is already working in the field. The external SDRAM is an IS42S32200L connected to SDRAM2. Because the STM32F429IIT6 micro shares the FMC_NBL2 line (SDRAM byte mask) on PI4 with LTDC_B4 for the RGB888 display DQM1 and DQM2 on the SDRAM were tied together (before my time). This leaves the SDRAM in 32 bit mode with "Byte enable" in the FMC set to "Disable".
Using a 32 bit pointer I can manually fill the SDRAM and the system transfers the data, through DMA, to the display perfectly. Using a single color to create a display in TouchGFX I can watch the data being written to the SDRAM using a Watchpoint for the frame buffer in SDRAM. The break point shows "No source available for "touchgfx::LCD24bpp::fillBuffer() at 0x800f486"". The write sequence for RGB888 color 0x0201CD to the SDRAM for 2 adjacent 32 bit words looks like this:
Word 1 Word 2
ff01ffff 0000ffff - First write
ffff02ff 0000ffff - Second write
ffffffcd 01ffffff - Third write
ffffffcd ff02ffff - Fourth write
ffffffcd ffffff01 - Fifth write
The sequence above started after I had filled the frame buffer with 0000ffff. It appears to me that the first and second writes are 8 bit writes while the third write is a 16 bit write. I have not found anything that allows me to change anything in this area.
Any suggestions would be greatly appreciated.