diff options
author | Sujit Kautkar <sujitka@chromium.org> | 2021-04-19 12:30:31 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-28 18:34:30 +0000 |
commit | 31f8f51dc6f860d11b7445a49e099ea60126509d (patch) | |
tree | 583757f29af7e3a93030308437e9a3ec55771452 | |
parent | be340d0147e8c9a8e771b2f8eb2a6454d27dc691 (diff) | |
download | chrome-ec-31f8f51dc6f860d11b7445a49e099ea60126509d.tar.gz |
flash_fp_mcu: Add delay to consider bootloader startup
Add delay of 100 ms to consider minimum bootloader start time for stm32.
This fix prevents triggering stm32mon before bootloader is finished.
BRANCH=none
BUG=b:185074067
TEST=Multiple 'flash_fp_mcu <fpfw>'
Tested on coachz, nocturne and morphius boards
Change-Id: Ic60e9e67c29664ce22bfc66bec6eaf76ffc80454
Signed-off-by: Sujit Kautkar <sujitka@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2837485
Tested-by: Sujit Kautkar <sujitka@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Commit-Queue: Sujit Kautkar <sujitka@chromium.org>
(cherry picked from commit 8cff79c7f79da51e20bfd76f6e1e1b3465b63262)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2856928
Reviewed-by: Sujit Kautkar <sujitka@chromium.org>
-rw-r--r-- | util/flash_fp_mcu | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu index 14a5c21907..2485acdbd1 100644 --- a/util/flash_fp_mcu +++ b/util/flash_fp_mcu @@ -295,6 +295,14 @@ flash_fp_mcu_stm32() { # Release reset as the SPI bus is now ready gpio 1 "${gpio_nrst}" + # As per section '68: Bootloader timings' from application note below: + # https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf + # bootloader startup time is 16.63 ms for STM32F74xxx/75xxx and 53.975 ms + # for STM32H74xxx/75xxx. SPI needs 1 us delay for one SPI byte sending. + # Keeping some margin, add delay of 100 ms to consider minimum bootloader + # startup time after the reset for stm32 devices. + sleep 0.1 + # Print out the actual underlying command we're running and run it echo "# ${cmd}" ${cmd} |