To upload a program to a chip from Thomson Semiconductor you need an ST-Link programmer device to connect your PC. Thompson sells branded programmers, adaptors and cables. We'll use an inexpensive ST-LinkV2.
They look like AVR programmers but you need to read the pinouts on the side. One side is a SWIM interface for STM8 chips and the other SWD for STM32. Usually you can use the 3Volt or 5V leads but you may have to power your board from USB.
Reliable, even the low cost ones. The programmers are one good reason to work with STM32 and STM8 processors. Windows Device Manager needs to show a happy com port driver and is usually found automatically.
This is an inexpensive ST-Link V2 programmer connected to a BluePill development board with an STM32 ARM cpu. Pay close attention to the four wires that carry flash programs and debugging information.
During data exchange the clock pin pulses and data transmits on the DIO lead. You can program the BluePill other ways but this is the easiest. We can use SWD to add a bootloader and then program through the USB port.
STM32 chips are more sophisticated than STM8 and SWD provide a powerful debugging interface. We can look inside the registers inside the processor and change bits in memory from our PC.
Install ST-Link SoftwareThomson Semiconductor gives away free development software. ST-Link can be downloaded standalone or bundled.
ST-Link scans for programmer devices. Click on the plug icon to connect. We are looking at the Device Memory inside our processor. Watch lights on the programmer device and read status messages.
Look at all this stuff. Connect, Program and Disconnect mean what they say. Compare the program in flash memory to a file in the computer.
Watch the lights on the programmer devices. Both boards are running blinky when ST-Link connects through the large white programmer device. Blink program stops running.
Software development programs such as STM32CubeIDE and Arduino will connect and upload programs to flash. Make sure that setup information and wires are correct.
Backup Flash Memory from DeviceST-Link lets you choose file name and extension. Your IDE program may be generating.bin,.hex,.elf or other files.
Notice it is setup to connect using the SWD port. JTAG is another programming/debugging interface. Proper reset of the processor is needed to let the program run.
Four programmer devices on one PC. Including the STM32Nucleo board with an STM32 ARM cortex/
We'll do a blinky project for STM32 chips. Properly setup the IDE program does more than just load flash programs into the device. It opens up the device so that you can see inside as it runs a program.
STM32CubeProgrammerThis software is more sophisticated version of ST-Link. It can download a backup of device flash or upload an executable generated by STM32CubeIDE or Arduino IDE.
Comments
Please log in or sign up to comment.