-
Bug
-
Resolution: Fixed
-
Medium
-
PDK
-
PDK-12257
-
-
-
PROCESSOR_SDK_08.04.00
-
PROCESSOR_SDK_09.00.00
-
Issue Description:
Below code can cause hang in the display driver in case mailbox is empty. There should be timeout mechanism in this code to make sure driver exits gracefully and reports this error to the application.
void messageReceive(DP_PrivateData *pD, DP_BusType busType)
{
:
/* read header first, to get size of message */
while (i < DP_MAILBOX_HEADER_SIZE)
{
mailboxEmpty = CPS_REG_READ(®Base->mhdp_apb_regs.MAILBOX_EMPTY_ADDR_p);
/* test if mailbox is not empty */
if (0U == mailboxEmpty)
{ readVal = CPS_REG_READ(®Base->mhdp_apb_regs.mailbox0_rd_data_p); pD->rxBuffer[i] = (uint8_t)(readVal & 0x000000FFU); *i++;* }
}
:
}
Resolution Description:
Added check for busy waiting and break after a certain time period.