summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSujit Kautkar <sujitka@chromium.org>2021-04-19 12:30:31 -0700
committerCommit Bot <commit-bot@chromium.org>2021-04-27 16:31:08 +0000
commit8c0712e7f63e67baa550d6b44b42bb34070bedae (patch)
tree4029b81135ec03863294401a8207ad8cb680315d
parent06ecb87fcb9a62caf6831f13234568f9eeabee94 (diff)
downloadchrome-ec-stabilize-13904.62.B-main.tar.gz
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/+/2854415 Reviewed-by: Sujit Kautkar <sujitka@chromium.org>
-rw-r--r--util/flash_fp_mcu8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu
index 40cc9a60ca..a6c489e72e 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}