Mqx 4.0 lcd rgb

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

Mqx 4.0 lcd rgb

1,602 Views
Microfelix
Contributor IV

hello

after solving the problem of flexbus, I would risolverse also the problem of the LCD display with RGB system.

I use K70 with MQX 4.0.ù

The problem is that when you tally gate and I write on the display appear as noise .... type lines of pixels.

Version 3.8 dell'mqx did not happen. Again, there is something like the cache that generates these problems?

thanks

Maurizio

0 Kudos
13 Replies

1,086 Views
Gargy
NXP Employee
NXP Employee

Hello,

I did not fully understand your question, but the could be two things what you think and need:

1: In case that you drive your LCD by FlexBus: There is no other change from MQX 3.8.0 to 4.0.0 than the Cache enabled on K70 system. But no change on FlexBus, there could rise the issue that the code is running faster and the slave (LCD) is not able to get this fast communication. The solution is improve the FlexBus settings (wait states, clock speed etc.)

2. You are driving the LCD RGB by LCDC peripheral and there is impact of enabled cache much bigger! Because he update of LCD data is not driven by CPU , but LCDC internal DMA logic, there is rising issue that you update your picture data inside the frame buffer , but if this frame buffer is in cache area the last updated dat still remains in cache!, So you have to after update the frame buffer just FLUSH all cache lines of frame buffer and that should be enough.

Good luck,

Petr

0 Kudos

1,086 Views
Microfelix
Contributor IV

Thank you.

Actually I have not been so distinct.

I'm using an LCD with RGB.

Until MQX 3.80 was fine.

With the MQX 4.0, to run the same LCD, and avoid this problem, I had to lower the clock frequency. But this involves a refresh me down and you see a flash of the screen.

Maurizio

0 Kudos

1,086 Views
Gargy
NXP Employee
NXP Employee

Please told me first what peripheral are you using to control LCD.

Petr

0 Kudos

1,086 Views
arnogir
Senior Contributor II

Hi

I take a very old question, but I have exactly the same problem!

I'm using a K70 120MHz with MQX4.1

I using the LCDC to drive a 800x480 screen.

And then noise appears on the screen type line etc..

Like if DMA transfer not have the time to get data in RAM because this appears when the software need read some data in RAM.

Petr you said:

2. You are driving the LCD RGB by LCDC peripheral and there is impact of enabled cache much bigger! Because he update of LCD data is not driven by CPU , but LCDC internal DMA logic, there is rising issue that you update your picture data inside the frame buffer , but if this frame buffer is in cache area the last updated dat still remains in cache!, So you have to after update the frame buffer just FLUSH all cache lines of frame buffer and that should be enough.

Could you said me how flush all cache line of the frame buffer?

0 Kudos

1,086 Views
Gargy
NXP Employee
NXP Employee

Hi,

Please try to new version of the LCDC driver placed on GitHUB(https://github.com/Gargy007/eGUI) and the name of the Branch is: Bug_-_Race_condition_in_K70_LCDC_driver .

We was solving similar issue.

Let me know Petr

0 Kudos

1,086 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Have you checked the eGUI source code?

https://github.com/Gargy007/eGUI/blob/master/D4D/low_level_drivers/LCD/lcd_hw_interface/k70_lcdc/d4d...

static void D4DLCDHW_FlushBuffer_K70LCDC(D4DLCD_FLUSH_MODE mode)

Luis

0 Kudos

1,086 Views
arnogir
Senior Contributor II

Hi,

I'm sorry, I have forgot an important thing:

I'm working with PEG.

0 Kudos

1,086 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Ok, you have the same in the PEG K70 driver:

    //_DCACHE_FLUSH()

    {

        LMEM_PSCCR |= LMEM_PSCCR_GO_MASK |  LMEM_PSCCR_PUSHW0_MASK | LMEM_PSCCR_PUSHW1_MASK ;

        while( LMEM_PSCCR & LMEM_PSCCR_GO_MASK ){};

    }

Regards,

Luis

0 Kudos

1,086 Views
arnogir
Senior Contributor II

Ok,

Then when I must call it?

(You will find in attached file my Lcd screen driver)

Many thank for your reactivity!

0 Kudos

1,085 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

In function:

void K70_TWRLCDScreen::MemoryToScreen(void)

    …..

    #if defined (PEG_DOUBLE_BUFFER)

    SwapFrameBuffers(Copy);

    #endif

   //_DCACHE_FLUSH()

    {

        LMEM_PSCCR |= LMEM_PSCCR_GO_MASK |  LMEM_PSCCR_PUSHW0_MASK | LMEM_PSCCR_PUSHW1_MASK ;

        while( LMEM_PSCCR & LMEM_PSCCR_GO_MASK ){};

    }

}

#if defined(PEG_DOUBLE_BUFFER)

Luis

0 Kudos

1,086 Views
arnogir
Senior Contributor II

Hi

After try, add DCACHE_FLUSH after the swapFrameBuffers has no effect on the noise.

But I also try to comment this line in the .hpp:

#if defined (PEG_DOUBLE_BUFFER)
//#define SYNCHRONIZE_DOUBLE_BUFFER
#endif

With this no interruption is generated on all End of Frame (about 60Hz..) and I havn't noise now, even if I don't call the Cache flush.

0 Kudos

1,086 Views
LuisCasado
NXP Employee
NXP Employee

Great, I didn't analyze the cause of the noise, only the cache question J but great that you have found it.

Luis

0 Kudos

1,086 Views
arnogir
Senior Contributor II

Thank you for your reactivity!

:smileyhappy:

0 Kudos