RT1052 ELCDIF_Deinit() may cause system crash

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

RT1052 ELCDIF_Deinit() may cause system crash

1,127 Views
dasg
Contributor I

I use sdram and elcdif to draw picture, the system may crash, when I test elcfid as below:

while (1)

{

ELCDIF_RgbModeInit();

ELCDIF_RgbModeStart();

delayMs(5000);

 

ELCDIF_RgbModeStop();

ELCDIF_Deinit();

delayMs(5000);

}

The ELCDIF_Deinit() --> CLOCK_DisableClock(kCLOCK_Lcd) make system crash。

Please check and fix this issue。

 

0 Kudos
Reply
6 Replies

198 Views
ecorini
Contributor I

Hi,

I have a similar problem (crash) when calling ELCDIF_RgbModeStop + ELCDIF_Deinit.

Problem disappeared when using "fsl_elcdif" driver from SDK 2.16.0

It seem that this change in NXP SDK corrected the problem:

ecorini_0-1725461170416.png

Best Regards

0 Kudos
Reply

1,107 Views
jay_heng
NXP Employee
NXP Employee

Which SDK version are you using? Which demo is your code based?

0 Kudos
Reply

1,095 Views
dasg
Contributor I

1、SDK_2_12_0_MIMXRT1052xxxxB

2、It is tested in the environment of rtthread, the example of drive elcdif is:boards\evkbimxrt1050\emwin_examples\emwin_slide_show。

main difference:

1)sdram is 144MHz

2) elcdif is 39.6MHz, 800x600

3) no lcd irq

4) one thread is emwin, draw picture on frembuffer。another thread loop initialization and deinitialization of elcdif

0 Kudos
Reply

1,082 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @dasg ,

CLOCK_DisableClock(kCLOCK_Lcd) can only close LCD pixel clock. It should not make the system crash. I just add this sentence into emwin_slide_show.c example, at line 659. It works fine. Are you sure what you close is reaally the LCD pixel clock? 

Can you share your project here?

 

Regards,

Jing

0 Kudos
Reply

1,077 Views
dasg
Contributor I

1、CLOCK_DisableClock(kCLOCK_Lcd) close elcdif apb clock。

CLOCK_DisableClock(kCLOCK_LcdPixel) close elcdif pixel clock。

2、I use ELCDIF_Deinit(),not direct call CLOCK_DisableClock(kCLOCK_Lcd)。

3、you can add below code at emwin_slide_show.c example, at line 659

while (1)

{

if (xxx)

{

GUI_Delay(25);

}

ELCDIF_RgbModeInit();

ELCDIF_RgbModeStart();

delayMs(5000);

 

ELCDIF_RgbModeStop();

ELCDIF_Deinit();

delayMs(5000);

}

 

0 Kudos
Reply

1,054 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @dasg ,

I can use ELCDIF_RgbModeStop() and ELCDIF_Deinit() to close display, no problem. But I can't use ELCDIF_RgbModeInit() to restart because Emwin use GUI_Init() to initialize the LCD interface and it is encapsulated. I tried on other lcd demo, there is no problem with such code.

 

Regards,

Jing

0 Kudos
Reply