From 3fcecc07e122d06cba6eb38186f39df83dbc5b3d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 25 Mar 2019 14:55:59 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1539016 Commit-Ready: Tom Hughes Tested-by: Tom Hughes Reviewed-by: Gwendal Grignou --- util/stm32mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/stm32mon.c') 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) { -- cgit v1.2.1