Skip to main content
Visitor
August 5, 2026
Question

Flashing M4 Core in STM32MP157F-DK2 using STM32Cube Programmer.

  • August 5, 2026
  • 1 reply
  • 12 views

How to flash M4 Core in STM32MP157F-DK2 using STM32Cube Programmer..? I have the Hex file but whenever I open Cube Programmer ST-LINK is not Detecting instead its Deteccting as USB, and in Device manager USB is recognized as STM32 Bootloader

1 reply

Visitor
August 5, 2026

The behavior you are observing, where the board is detected as an STM32 Bootloader via USB rather than an ST-LINK device, is completely expected. For the STM32MP1 series, STM32CubeProgrammer utilizes the USB DFU (Device Firmware Upgrade) interface for flashing, not the ST-LINK debug interface. The ST-LINK connector is primarily intended for debugging with STM32CubeIDE, not for mass programming.

To successfully flash your M4 core .hex file, you must force the board into USB boot mode by setting the SW1 boot switches to all OFF positions (BOOT0=0, BOOT1=0, BOOT2=0). Once powered on via the USB Type-C port (CN7), the board will be correctly recognized, allowing STM32CubeProgrammer to connect via USB and flash your firmware.

After flashing, remember to reconfigure the SW1 switches for your normal boot mode (e.g., from the microSD card). The A7 core, running Linux, will then load and start the M4 firmware using the remoteproc framework.