Flash Programmer - ArrowElectronics/Industrial-Control-Monitoring-01 GitHub Wiki

Programming the flash on the MCU

The Micro USB connector on the kit may be connected to a USB connection on a Windows PC to program the flash of the STM32L4. If the board is not currently powered by the J5 connection, then the board may receive power via the USB connector. Review the diagram on the main page and insure the jumper is set properly for the desired power configuration. USB power is only intended for programming purposes, not for normal operation of the board.

Programming is enabled using the DAPLink drag and drop functionality. This is supported with the secondary STM32F103 MCU. When the USB cable is connected to a Windows PC, a new drive is enumerated with the drive label "DAPLINK." Copying a previously compiled firmware binary to this drive writes the contents to the flash of the target STM32L4 MCU. (Both .bin and .hex formats are supported.)

Compiler

System Workbench for STM32 IDE was used for development. The newer CubeIDE environment is now available but only minimal testing has been done. (Please note that projects created in System Workbench for STM32 can be forward migrated to the cubeIDE, but not the other way.)

The project files may be downloaded here.

Onboard DAPLink device

  • Based on Arm MBED DAPLink
  • STM32F103 CPU
  • MSC - drag-n-drop programming flash memory
  • CDC - virtual com port for log, trace and terminal emulation
  • HID - CMSIS-DAP compliant debug channel
  • WEBUSB HID - CMSIS-DAP compliant debug channel