D4D Screen and Object handling

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

D4D Screen and Object handling

2,809 Views
VGS
Contributor III

Hi

I am using k70 120 MHz controller with D4D Ver 3 bare board  software  for developing my GUI interface.

1) While using "D4D_ShowObject()" function for hiding objects the whole screen itself is refreshing/Flashing.

I want  only the paticular portion of the screen to change not the whole screen to refresh. Is this possible .Are there any workarounds to prevent whole screen updating

2)  When i call a popup screen smaller than main screen and then use "D4D_EscapeScreen()" the whole display is refreshing and flashing.

Is it possible to limit the refresh to only the corresponding portion of small popup screen and prevent the whole main screen from flashing.

For example->  I am having a small keypad screen smaller than the main screen as popup in my main screen. When exiting the keypad screen the whole

screen is refreshed where as i want only the keypad screen to disappear .

3)  With this setup it seems that my screen refresh rate is slow.How can i make screen refresh rate faster.

Thanks

Gowrishankar

Labels (1)
0 Kudos
Reply
16 Replies

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

With the K70 you can enable dual buffer screen, so you will improve the look and feel of the screens. eGUI will draw in the hidden buffer and then swap the buffers.

Regards,

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi Luis

thanks for the information.But can you please help us to understand how to enable the dual buffer in D4D. also how to draw screens in the second buffer and how to display 2nd buffer.

So far in D4D we could not find any methods to enable this feature.

can you please share with us any example programs for using the dual buffer screen feature  in D4D.

Thanks

Gowrishankar

0 Kudos
Reply

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Please, use the latest eGUI code : https://github.com/Gargy007/eGUI

You don't need to take care of the buffers, that is managed by eGUI. All the objects are drawn in the background buffer and then eGUI driver swap the buffers. The K70 demo is github enables double buffer by default.

#define D4DLCDHWFB_DOUBLE_BUFFER              1

Regards,

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi Luis,

1. when "#define D4DLCDHWFB_DOUBLE_BUFFER      0"  Screen Diaplays.

2. when "#define D4DLCDHWFB_DOUBLE_BUFFER      1"  Screen goes Blank. Why?


when D4DLCDHWFB_DOUBLE_BUFFER is enabled do we need to consider any other settings?


Regards,

Gowrishankar.


0 Kudos
Reply

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

What hardware and compiler are you using?

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi,

I m using Kinetis-K70 MCU and Code warrior 10.4

... Bareboard Project

Gowrishankar

0 Kudos
Reply

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

The github demo is working fine with IAR and MQX.  What I asked about hardware, I meant if you are using the TWR-K70.

Difficult to know what is the issue in your side. The application use DMA to copy buffers.

Try to disable first the DMA and use copy buffers by software and then move to DMA.

  #define D4DLCDHWFB_DMA_ENABLE                 0

Regards

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi,

Thanks, we use TWR-K70 with TWR-LCD-RGB.

1. Could you help us with further info on how  to disable first the DMA and copy buffers by software and then move to DMA ?

2. We tried to compile "github demo" with IAR but getting following errors

cannot open source file "d4d.h"

cannot open source file "mqx.h"  etc.,

3. How to "add the include path" in IAR? since we have not worked in IAR


Regards.

Gowrishankar.

0 Kudos
Reply

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

  1. Just use #define D4DLCDHWFB_DMA_ENABLE 0
  2. And 3) You have to build the MQX libs first. I have used the latest MQX 4.1. Build the libs with the attached user_config.h

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi,

Thanks, After bellow setting

  #define D4DLCDHWFB_DMA_ENABLE             0
  #define D4DLCDHWFB_DOUBLE_BUFFER          1

TFT init screen is displayed, but code is held up in "while(enableWrite <= 0)"

with in the function static void D4DLCDHW_WriteData_K70LCDC(unsigned long addr, D4D_COLOR value)

how to get over this issue?


Regards,

Gowrishankar

0 Kudos
Reply

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Have you checked if code is entering in the D4DLCDHW_ISR_K70LCDC isr? MQX performs some initializations that your bare metal approach should do. You will have to check that LCDC isr is enabled and working.

Best Regards,

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi,

  eGUI_CW_10_6_MQX_4_1.zip

This MQX sample code is working fine with Double Buffer Enabled and DMA dissabled so i am sure my hardware is OK.

Also i have verified that Baremetal code is entering  D4DLCDHW_ISR_K70LCDC isr but still when Double Buffer is enabled i am getting Blank Screen

Is there any specific linker file for this setting

Can you please provide working Baremetal smaple code for K70  with Double buffer enable

Best Regards,

Gowrishankar.

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi,

MQX sample code is working fine with Double Buffer Enabled and DMA dissabled so i am sure my hardware is OK.

Also i have verified that Baremetal code is entering  D4DLCDHW_ISR_K70LCDC isr but still when Double Buffer is enabled i am getting Blank Screen

Is there any specific linker file for this setting

Can you please provide working Baremetal smaple code for K70  with Double buffer enable

Best Regards,

Gowrishankar.

0 Kudos
Reply

1,978 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

I am sorry, I don't have bare metal code example. In my side is working fine double buffer + DMA using MQX, but never tried bare metal.

Luis

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi

In my test program i am using two screens - first screen and second screen.

Second screen is smaller than first screen.

Second screen is activate at regular interval (2 Sec) and then closed after 2 Sec.

For this setting the program is working fine and i am getting complete screen in 4.3" (480*272) TFT.

But when i try to use the same program for 7.0"(800*480)TFT some part of first sceen is cleared (Pictures attached below) .

When DMA is disabled 7.0" TFT works fine .

Can you please suggest any solutions for this problem

4.3" TF Configuration:

#define D4DLCDHWFB_X_MAX 480 

#define D4DLCDHWFB_Y_MAX 272

#define D4DLCDHWFB_DOUBLE_BUFFER 1

#define D4DLCDHWFB_DMA_ENABLE 1

7.0" TFT Configuration:


#define D4DLCDHWFB_X_MAX 800 

#define D4DLCDHWFB_Y_MAX 480

#define D4DLCDHWFB_DOUBLE_BUFFER 1

#define D4DLCDHWFB_DMA_ENABLE 1


DSC_0539.jpg

4.3" with DMA enabled First screen


DSC_0540.jpg

4.3" with DMA enabled First screen+ Second screen


DSC_0541.jpg

7.0" TFT with DMA enabled First screen


DSC_0544.jpg

7.0" TFT with DMA enabled First screen+Second Screen


Thanks,

Gowrishankar.

0 Kudos
Reply

1,978 Views
VGS
Contributor III

Hi Luis,

Thanks for the quick replay.

we will check this and reply back to you.

Thanks

Gowrishankar

0 Kudos
Reply