Program burner STLINK_V2&CMSIS_DAP_V2 production-DIY solution sharing

When I used a lot of burners, I had the idea to make a burner. Finally, because I had a few STM32F103C8T6 on hand, I took the idea into action.

First, I set the target on STLINK, because most of the chips I use are under ST, so I collected STLINK's open source information on the Internet and found an open source solution with STM32F103C8T6 as the main control, and the official STLINK firmware

Putting the results picture, I have always thought that the burner I bought outside is too big. When I designed it, I changed all the resistance and capacitance to 0402 package. The crystal oscillator also uses a small package chip crystal oscillator, which has reserved TYPE-C interface. With two rows of pin headers, the volume of the entire board is 13*33mm, and the outer layer is covered with a transparent heat-shrinkable tube. The overall effect looks good

After the hardware was made, I found that there are many pits. The computer is a WIN10 system. It is necessary to install the STLINK driver in advance, and also install a driver compatible with the WIN10 system. After the driver is installed, there have been cases where the USB device has not been recognized. problem

In this situation, I collected multiple versions of STLINK firmware through the Internet. After trying one by one, finally one firmware was burned in. The computer can recognize STM32 STLink normally.

Then I can’t wait to burn the STM32 program on KEIL5 MDK. I found an STM32 development board. After connecting to STLINK, the software prompts that the STLINK firmware version is too low and needs to be upgraded.

STM32F103C8T6 has 64KB of memory, there is not enough memory to burn the latest STLINK firmware of KEIL5, which means that it is impossible to use the KEIL software to directly use the STLINK burning program

Facts have proved that STM32F103C8T6 is not suitable for use as the main control chip of STLINK. In order not to waste the STLINK burner, a STM32 ST-LINK Utility software is installed.

The software can recognize the STLINK writer well. Through this software, the program HEX file can also be burned to the board, but there is no way to use the KEIL software directly. I feel that it is still a little bit worse after all.

After experiencing the above failure, I changed the target to CMISI_DAP burner. DAP burner is also downloaded in SWD mode. It has an advantage that it can be compatible with serial port functions at the same time, which is equivalent to two in one. The most important thing is online There are also open source materials related to the use of STM32F103C8T6 as the master DAP burner

After a single operation, the resistors and capacitors are all changed to 0402 package. The small package chip crystal oscillator also uses the crystal oscillator. The TYPE-C interface and two rows of pin headers are reserved. The board is combined with the experience of the previous version of STLINK. Slightly bigger, and changed the color of the board to black, the volume of the entire board is 15*35mm, and the outer layer is also covered with a transparent heat shrink tube. The results are as follows:

After burning the firmware to the DAP burner, it can be recognized directly by plugging in the WIN10 system of the computer without installing a driver, which is very friendly

After opening the KEIL5 MDK software, it is found that the DAP writer can also be recognized normally

Connect the DAP burner to the development board for testing. The burner can recognize the STM32 chip of the development board, and the program can be burned normally, which proves that it is no problem to burn with KEIL.

Next, use the serial port function to test and burn the microcontroller. The microcontroller used is STC89C52RC. Use the stc-isp assistant to burn. The software can recognize the COM port normally.

Test the burning program, click to open the program file, load the HEX file you want to download, and after loading it; then click download/program, and the program can be successfully downloaded to the MCU through cold start

Facts have proved that there is no problem with STM32F103C8T6 being used as a DAP burner. We will continue to test and use the DAP burner in the future, and may also study the production of JLINK burners.

 

Guess you like

Origin blog.csdn.net/ps574134526/article/details/113273129