Endian Issue with LCD Frame Buffer in SDRAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Endian Issue with LCD Frame Buffer in SDRAM

1,482 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by twomeyw22 on Thu Apr 17 14:38:39 MST 2014
Hi All,

I'm using an LPC1788 with a TFT LCD and 16 bit SDRAM for the frame buffer, with color data in 5-6-5 format.  Everything is working except my colors are all messed up because of an endian issue.

Green, for example, should be 0x7E0, but to display green I actually need to write 0xE007.

The LCD Control register (CTRL, address   0x2008 8018) has a bit for setting endianness (BEBO) but this has no effect.  The SDRAM has a similar configuration bit this also has no effect.

Does anyone else have any other ideas?

Worst case is I write a script to swap bytes in all my image bitmap arrays but that seems like a hack.  There must be some way to correct this in the microcontroller configuration...
Labels (1)
0 Kudos
Reply
4 Replies

1,459 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Fri Apr 18 12:10:46 MST 2014
Sorry, I mixed this up. The LCD byte order is with another microcontroller.

regards
Wolfgang
0 Kudos
Reply

1,459 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by twomeyw22 on Fri Apr 18 11:06:29 MST 2014
Solved this one.  The frame buffer location was off by one byte...
0 Kudos
Reply

1,459 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by twomeyw22 on Fri Apr 18 07:32:32 MST 2014
Wolfgang, is there something specific you are referring to?  I did not see anything in the errata that would describe this issue.
0 Kudos
Reply

1,459 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Fri Apr 18 06:04:09 MST 2014
You have checked the errata sheet, have you?

regards
Wolfgang
0 Kudos
Reply