2020-08-11 12:03 AM
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).
2020-08-11 05:11 AM
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.
2020-08-11 05:24 AM
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.
2020-08-11 06:03 PM
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.