diff options
author | Tom Hughes <tomhughes@chromium.org> | 2019-03-25 14:55:59 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-03 18:13:52 -0700 |
commit | 3fcecc07e122d06cba6eb38186f39df83dbc5b3d (patch) | |
tree | 15a72dfe851ee36b8863155a001b0af3a9323477 /util | |
parent | d388343e3b01f780fa621b3c840c2557fcc6e477 (diff) | |
download | chrome-ec-3fcecc07e122d06cba6eb38186f39df83dbc5b3d.tar.gz |
hatch_fp: Fix flash erase in stm32mon
hatch_fp uses STM32F412, which *does* support mass erase.
The original commit that matches against STM32F41 seems to be targeted
to the STM32F411 based on the commit message: 09a7fa4ae
When trying to erase the STM32F412 for hatch_fp by page, the command
fails:
Waiting for the monitor startup ...Done.
ChipID 0x441 : STM32F412
Bootloader v1.1, commands : 00 01 02 11 21 31 44 63 73 82 92
Unprotecting flash read...
Flash read unprotected.
Waiting for the monitor startup ...Done.
Flash write unprotected.
Waiting for the monitor startup ...Timeout
Done.
Erasing...
NACK
payload 0 ACK failed for CMD44
BRANCH=None
BUG=b:124996507
TEST=hatch_dut> flash_fp_mcu ec.bin
Change-Id: Idc800b1f3ae29f7776405b1e952f71ef2d7c8a14
Signed-off-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1539016
Commit-Ready: Tom Hughes <tomhughes@chromium.org>
Tested-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/stm32mon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/stm32mon.c b/util/stm32mon.c index fc0a727644..68c7ebc0c3 100644 --- a/util/stm32mon.c +++ b/util/stm32mon.c @@ -1186,7 +1186,7 @@ int main(int argc, char **argv) if (flags & FLAG_ERASE || output_filename) { if ((!strncmp("STM32L15", chip->name, 8)) || - (!strncmp("STM32F41", chip->name, 8))) { + (!strncmp("STM32F411", chip->name, 9))) { /* Mass erase is not supported on these chips*/ int i, page_count = chip->flash_size / chip->page_size; for (i = 0; i < page_count; i += 128) { |