cancel
Showing results for 
Search instead for 
Did you mean: 

If any other color is encountered, it will not be filled

Korry
Associate III

Hi

I used partial frame buffer + FSMC.A strange thing happened to me.Any monochrome can fill an entire screen.But if you use more than one color, GFX will no longer fill when it encounters another color.

Did I do something wrong?

GFX version 4.130693W000003BWVFQA4.jpg0693W000003BWUvQAO.png

Thank you very much.

9 REPLIES 9
MM..1
Chief II
Korry
Associate III

Thank you very much for your answer.

Yes there are.

The problem of not being able to fill the entire screen is now resolved.

Now there's a new problem. The image seems to be stretched.

And only half of the images in the designer are displayed.

​I noticed the comment "//Change to SPI datasize to 8 bit from 16 bit". 

Can only use 8 bit data transfer? I'm using a 16-bit data transfer here.

0693W000003BZyFQAW.png0693W000003BZy5QAG.jpg

MM..1
Chief II

You dont write how framebuffer and RGB888 or RGB565 . Seems as any miss in setup

When you stay use partial buffer, then check function to write.

Korry
Associate III

If I just initialize the screen, the screen will only show backlight, no other colors.

The following files are the main changes I made using GFX. Would you please have a look at them?

Maybe I have a problem with the initialization of the screen?

MM..1
Chief II

LCDManager_WriteStartAndFrameBufferBlock(x,y,r,b,pixels);

you i mean need check this call and function.

As first is pixels in good format, as second x,y,r,b, seems as bad info... This function need only width and height...

And you stay dont reply how colour scheme used in touchGFX and how in LCD internal buffer...

And you cant call LCDManager_TransferComplete();

as next line when SPI use non blocking DMA transfers...

Korry
Associate III

Both GFX and LCD pixel formats are RGB565.

LCD use 8080 timing to transmit data.I'm not using DMA. XD

Korry
Associate III

And the other thing that's odd about it is, whether it's portrait or landscape.The screen can only display the first half of the canvas in the designer.Both the screen and GFX have 480 x 320 resolution.

MM..1
Chief II

Your LCDManager_WriteStartAndFrameBufferBlock(x,y,r,b,pixels); is fail , too colour order is bad writed to LCD.

Korry
Associate III

Thank you very much for your patient answer. I found that GFX always returns a pointer of type Uint8_t no matter what pixel format I set it to

"Const Uint8_t * pixels = frameBufferAllocator->GetBlockForTransfer (r);"

How do I get the format I want?For example, the RGB565. Documentation here doesn't seem to have a detailed description of how to store after rendering.