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。
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:
Best Regards
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
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
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);
}
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