cancel
Showing results for 
Search instead for 
Did you mean: 

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

Agao.1
Associate II

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).

3 REPLIES 3
TDK
Guru

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".

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 Up vote any posts that you find helpful, it shows what's working..
Agao.1
Associate II

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.