Graphic glitch from display connected to IMXRT1062

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

Graphic glitch from display connected to IMXRT1062

527 Views
filo96
Contributor III

Dear NXP community,

We are encountering a problem with a 800x480 display which is connected to our IMXRT1062.

I want to state that without the bootloader, this problem wasn't present.

 

The IMXRT has a 7" display, 30MB of RAM, 64MB of flash.

Inside the bootloader we initialize graphics (by using the LVGL library), to show some basic information at the startup. Then, when it jumps to the app, these intializations are performed again.

After the jump from the bootloader to the application, randomly, a graphic glitch apprears and it remains all the time until we power off the board. At the next power on, sometimes it appears again but not always. So it is random.

In the bootloader graphics, this glitch doesn't appear.

 

We tried to avoid the initialization of the SEMC pins and the clocks. We also compared the dcd_data[] array between app and boot (they're the same).

 

We attach a video of the graphic glitch, to give a more specific idea of the issue: GLITCH VIDEO . Some pixels moves with a flicker and the from the left side of the screen apprear the elements which exit from the right side.

Thank you for your help.

Labels (1)
0 Kudos
Reply
2 Replies

489 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @filo96,

Is there a specific reason why you initialize the graphical interface twice? You mention that initializing it only on the application works OK. Are you properly de-initializing it before doing the whole initialization process again on the app? Is the initialization process the same on bootloader and app? are you certain that the frame buffers are being properly initialized once the app starts?

BR,
Edwin.

0 Kudos
Reply

461 Views
filo96
Contributor III

HI @EdwinHz,

Is there a specific reason why you initialize the graphical interface twice?

At first glance, I thought the problem was due to this double initialization. Indeed, there was a problem of application stuck when jumping from boot to app.

 

Are you properly de-initializing it before doing the whole initialization process again on the app?

The next step was a de-initialization before jumping to the app.

I did something like this:

    // Task grafica
    //
    vTaskSuspend(gh_task_graphics);

    if (gh_task_graphics != NULL)
    {
        vTaskDelete(gh_task_graphics);
        gh_task_graphics = NULL;
    }

    // LVGL & ADC
    //
    lv_mem_deinit();
    lv_deinit();
    ADC_ClearStatusFlags(DEMO_ADC_BASE, 0xFFFFFFFF);
    ADC_Deinit(DEMO_ADC_BASE);

    // Task USB
    //
    vTaskSuspend(gh_task_usb_host);

    if (gh_task_usb_host != NULL)
    {
        vTaskDelete(gh_task_usb_host);
        gh_task_usb_host = NULL;
    }

    // Timer
    //
    xTimerStop(timerHndl1Sec, pdMS_TO_TICKS(1));
    xTimerStop(gh_elfa_timer, pdMS_TO_TICKS(1));
    xTimerDelete(timerHndl1Sec, pdMS_TO_TICKS(1));
    xTimerDelete(gh_elfa_timer, pdMS_TO_TICKS(1));
    timerHndl1Sec = NULL;
    gh_elfa_timer = NULL;

    // UART
    //
    LPUART_DisableInterrupts(DEMO_LPUART, kLPUART_RxDataRegFullInterruptEnable);
    LPUART_Deinit(DEMO_LPUART);

    // USB
    //
    uint8_t irqNumber;

    uint8_t usbHOSTEhciIrq[] = USBHS_IRQS;
    irqNumber                = usbHOSTEhciIrq[CONTROLLER_ID - kUSB_ControllerEhci0];
/* USB_HOST_CONFIG_EHCI */
    NVIC_ClearPendingIRQ(USB_OTG1_IRQn);
    NVIC_ClearPendingIRQ(USB_OTG2_IRQn);
    NVIC_DisableIRQ(USB_OTG1_IRQn);
    NVIC_DisableIRQ(USB_OTG2_IRQn);
    DisableIRQ((IRQn_Type)irqNumber);

    // Flash
    //
    /* Disable I cache and D cache */
    if (SCB_CCR_IC_Msk == (SCB_CCR_IC_Msk & SCB->CCR))
    {
        SCB_DisableICache();
    }

    if (SCB_CCR_DC_Msk == (SCB_CCR_DC_Msk & SCB->CCR))
    {
        SCB_DisableDCache();
    }

    /* Wait for FlexSPI idle to make sure no flash data transfer. */
    while ((FLEXSPI->STS0 & FLEXSPI_STS0_ARBIDLE_MASK) == 0U)
    {
    }

    //FLEXSPI_DisableInterrupts(EXAMPLE_FLEXSPI, 0xFFFFFFFF);
    FLEXSPI_Deinit(EXAMPLE_FLEXSPI);

    taskENTER_CRITICAL();

    DisableGlobalIRQ();

And then I performed the jump.

After that, I found the problem I show you in the video I attached in the first message.

 

Is the initialization process the same on bootloader and app?

Yes. Regarding this point, I read it should be avoided the re-initialization of the clocks and peripherals.

This is why I tried to remove the Board initialization during the startup of the application:

/* ONLY IN THE BOOTLOADER I PERFORM THESE LINES OF CODE! I REMOVED THEM FROM THE APPLICATION */
    BOARD_ConfigMPU();
    BOARD_ReconfigFlexSpiRxBuffer();
    BOARD_InitPins();
    BOARD_InitI2C1Pins();
    BOARD_InitSemcPins();
    BOARD_BootClockRUN();
    BOARD_InitDebugConsole();

    flexspi_nor_polling_transfer();

    NVIC_ClearPendingIRQ(USB_OTG1_IRQn);
    NVIC_ClearPendingIRQ(USB_OTG2_IRQn);

    USB_HostApplicationInit();

But I didn't solve anything!

 

are you certain that the frame buffers are being properly initialized once the app starts?

How can I check this? And how can I perform this kind of operation?

 

Thank you.

0 Kudos
Reply