diff options
author | Wai-Hong Tam <waihong@google.com> | 2018-05-22 15:52:10 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-30 01:02:48 -0700 |
commit | 9102494be2821ca3bce1662d8595e8c5e0addae5 (patch) | |
tree | 5a2ba0fa2bdb3867d8c995f822cafe8561466852 | |
parent | 1e58d25a59cfcc407de56ff85e0a84a77a427d96 (diff) | |
download | chrome-ec-stabilize-nocturne.10736.B.tar.gz |
flash_ec: stm32/npcx_uut: Set ec_boot_mode to off on exitstabilize-nocturne.10736.Bstabilize-atlas.10736.B
The ec_boot_mode is used for flashing EC on STM32 and NPCX chips.
The ec_boot_mode pin is an open-drain GPIO. Doing save/restore is
destructive. For example, if DUT is unpowered (ec_boot_mode is "on"),
doing save/restore will force it outputting to "on". We should not
put it to the save/restore list. Instead, set it back to "off" on
exit.
BRANCH=none
BUG=b:80305869
TEST=Ran flash_ec when DUT is unpowered -> failed as expected.
Reran again when powered. Checked EC UART showed-up afterward.
Change-Id: Iecf4b663fe9ae75a673a29a66505a4121d29888c
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1073646
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rwxr-xr-x | util/flash_ec | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/util/flash_ec b/util/flash_ec index d78dc3f142..c6342a6f64 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -499,6 +499,9 @@ cleanup() { fi fi + if [ "${CHIP}" == "stm32" -o "${CHIP}" == "npcx_uut" ] ; then + dut_control ${MCU}_boot_mode:off + fi if [[ "${SERVO_TYPE}" =~ "ccd_cr50" ]] ; then dut_control ccd_ec_boot_mode_uut:off dut_control ccd_ec_boot_mode_bitbang:off @@ -596,22 +599,18 @@ servo_v4_with_ccd_cr50_VARS="cold_reset" # Flashing an STM32 over the UART requires modifying the UART properties along # with the boot mode pin. if [ "${CHIP}" = "stm32" ] ; then - common_stm32_VARS=" ${MCU}_boot_mode ${MCU}_uart_parity" + common_stm32_VARS=" ${MCU}_uart_parity" common_stm32_VARS+=" ${MCU}_uart_baudrate" servo_v2_VARS+=$common_stm32_VARS servo_v2_VARS+=" ${MCU}_uart_en" servo_micro_VARS+=$common_stm32_VARS servo_micro_VARS+=" ${MCU}_uart_en" servo_v4_with_ccd_cr50_VARS+=$common_stm32_VARS - servo_v4_with_ccd_cr50_VARS+=" ec_uart_bitbang_en ccd_ec_boot_mode_uut" fi if $(in_array "${BOARDS_STM32_PROG_EN[@]}" "${BOARD}"); then servo_v2_VARS+=" prog_en" fi if [ "${CHIP}" = "npcx_uut" ] ; then - servo_v2_VARS+=" ${MCU}_boot_mode" - servo_micro_VARS+=" ${MCU}_boot_mode" - servo_v4_with_ccd_cr50_VARS+=" ccd_${MCU}_boot_mode_uut" servo_v4_with_ccd_cr50_VARS+=" ccd_keepalive_en" fi toad_VARS="${MCU}_uart_parity ${MCU}_uart_baudrate boot_mode" |