RT1052 ELCDIF_Deinit() may cause system crash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT1052 ELCDIF_Deinit() may cause system crash

1,126 次查看
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 项奖励
回复
6 回复数

197 次查看
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 项奖励
回复

1,106 次查看
jay_heng
NXP Employee
NXP Employee

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

0 项奖励
回复

1,094 次查看
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 项奖励
回复

1,081 次查看
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 项奖励
回复

1,076 次查看
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 项奖励
回复

1,053 次查看
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 项奖励
回复