Skip to main content
Senior III
July 7, 2023
Question

Too high timeout value in HAL driver

  • July 7, 2023
  • 2 replies
  • 1043 views

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

This topic has been closed for replies.

2 replies

ST Technical Moderator
July 7, 2023

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 "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Senior III
July 7, 2023

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