cancel
Showing results for 
Search instead for 
Did you mean: 

Randomly HAL_TIMEOUT in call HAL_DSI_LongWrite or ShortWrite

MM..1
Chief
HAL_StatusTypeDef HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi,
                                    uint32_t ChannelID,
                                    uint32_t Mode,
                                    uint32_t NbParams,
                                    uint32_t Param1,
                                    uint8_t *ParametersTable)
{
  uint32_t uicounter, nbBytes, count;
  uint32_t tickstart;
  uint32_t fifoword;
  uint8_t *pparams = ParametersTable;
 
  /* Process locked */
  __HAL_LOCK(hdsi);
 
  /* Check the parameters */
  assert_param(IS_DSI_LONG_WRITE_PACKET_TYPE(Mode));
 
  /* Get tick */
  tickstart = HAL_GetTick();
 
  /* Wait for Command FIFO Empty */
  while ((hdsi->Instance->GPSR & DSI_GPSR_CMDFE) == 0U)
  {
    /* Check for the Timeout */
    if ((HAL_GetTick() - tickstart) > DSI_TIMEOUT_VALUE)
    {
      /* Process Unlocked */
      __HAL_UNLOCK(hdsi);
 
      return HAL_TIMEOUT;
    }
  }

My STM32F469 with DSI LCD works ok. But on start and init LCD when sending commands sometimes display dont init. I debug and found this return used.

I need help . How deal with this?

0 REPLIES 0