cancel
Showing results for 
Search instead for 
Did you mean: 

8 bpp color palette

VLau
Associate III

Question is if TouchGFX framework supports 256 colors? How to tie together hardware CLUT settings and framework?

Due to internal RAM size limitations, I want to halve the framebuffer size by reducing the color depth from 16 bpp to 8 bpp . I cannot use the partial buffer strategy because my display has an RGB interface and no internal GRAM.

Firstly without TouchGFX enabled I changed LTDC setting PixelFormat to L8 and enable CLUT with some random colors to see if hardware settings are ok. That setting works, I can see my colors.

Now I make TouchGFX Designer application with 8 bit color depth option. After creating UI in simulator and see it in 256 colors style as expected. But on my target board everything is drawn in 256 grey scale.

There are references in the documentation about 8 bpp bitmaps for images to reduce flash occupied by them. But my goal is to reduce RAM for framebuffer, is it even possible.

1 ACCEPTED SOLUTION

Accepted Solutions

In Cube project folder /touchgfx/target delete this full before in cube generate code, here is bug that when you change from one to other config this files isnt correct regenerated always.

And generating process generate for you CLUT ARGB2222 , you dont need hand work here. Too touchgfx convert all images with selected dither to this CLUT table. You after generate see it in file target/TouchGFXHAL.cpp

View solution in original post

5 REPLIES 5
MM..1
Chief II

I setup it in Cube:

  1. set display type in LTDC to RGBxxx
  2. set Layer 0 to L8
  3. set Touchgfx to ARGB2222
  4. delete generated folder in target before close and generate ioc (need for generating color CLUT )
  5. open touchgfx template and create GUI
  6. build in cube
VLau
Associate III

Hey!

Can you please elaborate. Step 4: what folder should I delete?

Can't see settings for CLUT table in CubeMX nor in TouchGFX Designer, I thought CLUT is generated by hand

In Cube project folder /touchgfx/target delete this full before in cube generate code, here is bug that when you change from one to other config this files isnt correct regenerated always.

And generating process generate for you CLUT ARGB2222 , you dont need hand work here. Too touchgfx convert all images with selected dither to this CLUT table. You after generate see it in file target/TouchGFXHAL.cpp

VLau
Associate III

Thanks, it worked

DWeb_2
Associate III

@MM..1 This literally saved me hours of debugging