Skip to content
Commit e5093f41 authored by Joakim Andersson's avatar Joakim Andersson Committed by Benjamin Cabé
Browse files

drivers: flash: Fix timeout handling in STM32 flash driver



Fix timeout error that can occur in rare case.
When the thread writing to flash is pre-emptive it can be scheduled
out after reading the status register, but before checking if timeout
has expired. In this case it will report timeout without re-checking
the status register.

When writing a lot to flash, for example a firmware update process
then this situation is very likely to occur.

Signed-off-by: default avatarJoakim Andersson <joerchan@gmail.com>
parent 4866cfcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment