2015-03-03 02:24 AM
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 #stm32cubef42015-03-03 04:20 AM
Does look a bit daft, and other timeout instances where they do it right?
Cube errors would be better posted to the other forum (STM32 Software Tools and Firmware)2015-03-03 04:33 AM
2015-03-16 06:53 AM
Hi clement.pascal
Actually, we confirm that it's an error, but it does not impact the HAL driver since the return value is not checked when we call FMC_SDRAM_SendCommandIt will be fixed in the next release.thanks for your feedbacks.Best regards,Heisenberg.