AnsweredAssumed Answered

K70 LCDC performance with graphics window

Question asked by Franz Kaiser on Nov 19, 2012
Latest reply on Nov 19, 2012 by Luis Casado

Hi everybody,


I'm developing an baremetal application on the K70 Tower Board with the RGB-LCD addon. I started by using the lcdc example from the KINETIS_120MHZ_SC package and everythind worked fine. I find it very intuitive to directly manipulate the pixels in memory (external DDR2) and write the basic functions by myself.


However, I noticed when clearing the screen and completely redrawing it, there was a certain amount of flickering visible. I assume that the reason for this is, that the lcdc decides by itself when to refresh the screen and not after the program has rewritten the whole memory for the screen.


Therefore I looked for a possibiltiy to refresh the screen manually "by myself" after I was done editing the pixels im memory.

I ended up using the normal screen and the so called "graphics window" ontop of each other with the same dimensions.


One of the two is displayed while the program draws the new image in the second one. After the draw process is completed, I swap the images (by either displaying the graphics window or not, so the normal screen is visible).


Why do I do this?

The later application is (naturally) supposed to run as fast and fluid as possible so I needed a way of refreshing the display manually and didnt find any...


Now lets face the performance issue:

Since I want to refresh the screen as often as possible, the program redraws the whole screen in the while(1) together with the menue-navigation.

When there is no change in the menue (attached rotary-encoder for navigation), the graphics window and the screen contain an identical set of data/pixels and no flickering is visible.


Unfortunately, when I quickly navigate through the menue, I see, that the navigation is not that fluid anymore :-(


I was at the "electronica" trade fair last week in Munich and talked to one freescales employees about this issue. He mentioned, that it might be a simple performance issue with the DMA, as it is not that fast when transferring the data to the external memory while at the same time the lcdc-module reads the data back (single memory access).


I'm kind of stuck here and am really looking forward to some help which might get me in the right direction ;-)

Many thanks in advance!