MIPI DSI Read data Problem

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

MIPI DSI Read data Problem

Jump to solution
1,633 Views
LucaFerrario1978
Contributor II

Hello, 

I have a problem with Mipi Dsi driver for MX RT 1170, The system works fine when I need just to write to the display, but I can't receive data from the display. I create the dsi command in this way:

status_t MIPI_DSI_DCS_GetPowerMode(mipi_dsi_device_t *device, uint8_t *rxDataBuffer)
{
    dsi_transfer_t dsiXfer = {0};
    uint8_t txData;
    dsiXfer.virtualChannel = device->virtualChannel;
    dsiXfer.txDataType     = kDSI_TxDataGenShortRdOneParam;
    dsiXfer.txDataSize     = 1;
    dsiXfer.rxDataSize     = 1;
    dsiXfer.txData         = &txData;
    txData = (uint8_t)kMIPI_DCS_GetPowerMode;

    dsiXfer.rxDataSize     = 1;
    dsiXfer.rxData         = rxDataBuffer;

    return device->xferFunc(&dsiXfer);
}

 

But the system get stuck in status_t DSI_TransferBlocking(MIPI_DSI_Type *base, dsi_transfer_t *xfer), in the while (true):

 

    /* Wait for transfer finished. */
    while (true)
    {
        /* Transfer completed. */
        if (0U == (apb->PKT_STATUS & (uint32_t)kDSI_ApbNotIdle))
        {
            break;
        }

        /* Time out. */
        if (0U != (base->host->RX_ERROR_STATUS &
                   ((uint32_t)kDSI_RxErrorHtxTo | (uint32_t)kDSI_RxErrorLrxTo | (uint32_t)kDSI_RxErrorBtaTo)))
        {
            DSI_GetAndClearInterruptStatus(base, &intFlags1New, &intFlags2New);
            return kStatus_Timeout;
        }
    }

 

 

apb->PKT_STATUS is always equal to 1 (kDSI_ApbNotIdle) and base->host->RX_ERROR_STATUS is always equal to 0.

 

I tried to read the RDDPM "Read Display Power".
There is something wrong in the command or maybe the configuration of the device?

Attached the debug data, thanks for your help!

Regards

Tags (1)
0 Kudos
1 Solution
1,491 Views
LucaFerrario1978
Contributor II

Hello,

I have solved the problem!

The issue was inside the MPI DSI Low Power configuration: "BOARD_InitMipiDsiClock()" function inside display_support.c.

The clock configuration for "RxClkEsc" was wrong for my display, so I could transmit the DSI command but I could not receive.

Thanks for your help!

View solution in original post

0 Kudos
4 Replies
1,598 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @LucaFerrario1978 ,

We have some SDK examples for the DSI RT1170 can you please try in you EVK (evaluation board) this in order to evaluate if this is a configuration problem.

MIMXRT1170-EVK 

Please let me know if it works and if this work please use as a guidance for configuration the SDK example.

0 Kudos
1,582 Views
LucaFerrario1978
Contributor II

Hello @nxf77486 and thanks for your reply,

I've tried the sdk example "crank_storyboard_ebike" with RT1170 Evaluation Kit and RK055HDMIPI4M display, it works and I receive a 0x9C response from command 0x0A.

I've tried the same example with my board and ST7797 display, but I have the same problem: the program get stucked inside "DSI_TransferBlocking()" function in the same loop:

 

    /* Wait for transfer finished. */
    while (true)
    {
        /* Transfer completed. */
        if (0U == (apb->PKT_STATUS & (uint32_t)kDSI_ApbNotIdle))
        {
            break;
        }

        /* Time out. */
        if (0U != (base->host->RX_ERROR_STATUS &
                   ((uint32_t)kDSI_RxErrorHtxTo | (uint32_t)kDSI_RxErrorLrxTo | (uint32_t)kDSI_RxErrorBtaTo)))
        {
            DSI_GetAndClearInterruptStatus(base, &intFlags1New, &intFlags2New);
            return kStatus_Timeout;
        }
    }

 

Do you think that this is a display problem? Maybe It's a BTA problem?

Do you have any suggestion?

Regards

0 Kudos
1,551 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @LucaFerrario1978 ,

I'm glad to hear that you were able to use the RT1170 EVK with the RK055HDMIPI4M display. The problem could be on the display please verify that the example settings that we have on the SDK example are good with the ST product. But as it works with the RK055HDMIPI4M this could be related with the other non NXP product. Please let me know if you have any other question.

0 Kudos
1,492 Views
LucaFerrario1978
Contributor II

Hello,

I have solved the problem!

The issue was inside the MPI DSI Low Power configuration: "BOARD_InitMipiDsiClock()" function inside display_support.c.

The clock configuration for "RxClkEsc" was wrong for my display, so I could transmit the DSI command but I could not receive.

Thanks for your help!

0 Kudos