AnsweredAssumed Answered

Problem with FMC_SDRAM_SendCommand in stm32f4xx_ll_fmc.c ( Stm32CuveF4 V1.3.0 )

Question asked by clement.pascal on Mar 3, 2015
Latest reply on Mar 16, 2015 by Montassar BEN ROMDHANE
Hello.
I don't understand this code :
/* Get tick */
tickstart = HAL_GetTick();
 
/* wait until command is send */
while(HAL_IS_BIT_SET(Device->SDSR, FMC_SDSR_BUSY))
{
  /* Check for the Timeout */
  if(Timeout != HAL_MAX_DELAY)
  {
    if((Timeout == 0)||((HAL_GetTick() - tickstart ) > Timeout))
    {
      return HAL_TIMEOUT;
    }
  }    
   
  return HAL_ERROR;
}
for me, at the first time, we go out from the while with HAL_ERROR.
therefore, the 'while' is useless.
I was wrong, or there is a problem?
Thank's

Outcomes