Skip to main content
Agao.1
Associate
August 11, 2020
Question

The time-out time of flash operation is fixed 50000ms

  • August 11, 2020
  • 3 replies
  • 1145 views

I use STM32CubeMx to generate a project, in this project the FLASH_TIMEOUT_VALUE value is 50000ms by default.I want to know why STM32CubeMx set 50000ms as its value? It was used in this function:HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout).

This topic has been closed for replies.

3 replies

TDK
August 11, 2020

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
August 11, 2020

The data sheet for your unspecified STM32 part should provide minimum, maximum and typical expectations for various operations on flash, these might better bound when things go wrong.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Agao.1
Agao.1Author
Associate
August 12, 2020

I checked the datasheet, the maximum time of operation flash is 5.95s. That why I'm wondering that the FLASH_TIMEOUT_VALUE value is 50000ms(50s) instead of 5.95s.