When flashing STM32N6 in USB-DFU mode, as required when running test automation using twister, it is first required to power-off/power-on the board to set board ready for USB-DFU (thanks to specific BootROM configuration). Provide a script that performs this operation using STM32CubeProgrammer. This scipt could be provided in twister map.yaml file on 'pre_script' property of board entry. Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
10 lines
204 B
Bash
Executable File
10 lines
204 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2025 STMicroelectronics
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
STM32_Programmer_CLI -c port=swd mode=UR --power off index=0 --power on index=0 > /dev/null
|
|
|
|
sleep 1
|