cancel
Showing results for 
Search instead for 
Did you mean: 

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

pascal239955_st
Associate II
Posted on March 03, 2015 at 11:24

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 #stm32cubef4
3 REPLIES 3
Posted on March 03, 2015 at 13:20

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)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
pascal239955_st
Associate II
Posted on March 03, 2015 at 13:33

The other are ok.

sorry for the bad forum.

Posted on March 16, 2015 at 14:53

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_SendCommand

It will be fixed in the next release.

thanks for your feedbacks.

Best regards,

Heisenberg.