cancel
Showing results for 
Search instead for 
Did you mean: 

Too high timeout value in HAL driver

Kamil Duljas
Senior III

Hi,

I would ask about timeout value in HAL driver in flash module. There is set as 50 seconds. It's big value relative to embedded environment. There is any reason of this value? In context of option byte feature, how value i can accept? 1 ms, 100 ms? 

https://github.com/STMicroelectronics/STM32CubeF7/blob/fe78bad77db8206ff7b65e6d0d07fca912756404/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c#L74

Dudo
2 REPLIES 2
FBL
ST Employee

Hello @Kamil Duljas,

 

Some operations such as a full chip erase take a long time. 50sec is safely above this amount of time.

Changing the timeout value isn't going to affect normal operations. 

A flash operation should never timeout unless something is wrong.

 

Hope this helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Kamil Duljas
Senior III

Ok, so it's about full chip erase. I use only option byte. Can I shrink safety this value from 50s to 100 ms for example?

In ST implementation FLASH_WaitForLastOperation() is used in all option bytes function. Is it necessary?

Dudo