Long heard of ARM's various kinds of cool, but a look at that dense pin on the retreat, has been stuck in the single-chip computer level. This time I drew a piece of STM32 chip PCB board, want to learn a bit of their own.
Chip Model: STM32F103C8T6,CORTEX-M3 series, support ISP serial burning, support single-line debugging SWD and Jtag interface.
Package: LQFP48
Schematic diagram is as follows:
Design to consider two methods to write the program: first, the serial interface P4 TTL to USB directly connected to the computer, with the Mcuisp software download program; second, SWD interface P5 pick up a treasure on the purchase of Jlink ob arm downloader, Segger j-link arm software or Keil download.
The SWD cannot be downloaded after soldering.
Device Manager in the "Universal Serial Bus Controller" appears under the J-link driver identification, J-link Commander software can normally identify the chip, J-flash software can normally execute the target under Connect, unsecure chip and other software, But execute program or auto (F7) command times wrong:
-connecting ....
--connected successfully,
--erasing affecttd secttor .....
-error:ram check failed @ADDRESS 0x20000000
After online inquiry, the following questions are generally considered:
1, STM32 chip supply pin voltage is not enough
2, Jlink download line too long, interference is too large
3, the reset foot is pulled low
4, SEGGER j-link arm software version too old
5, welding problems and wiring problems
6. BOOT0 and BOOT1 Setup issues
7. Circuit interference on PCB board
J-link Commander Software is able to identify the chip correctly, which indicates that there is no problem with wiring and welding. The Jlink ob arm download line is less than 30cm long. SEGGER j-link arm software version V4.40. BOOT0 and BOOT1 are connected to 100k ground.
After repeated attempts to determine the problem, check the chip all pins, power supply pin and GND pin voltage normal, normal nrst pin voltage of about 2V, was pulled low, re-check the reset circuit, found that the reset capacitor C22 104 voltage is really about 2V, Someone on the net adjusts the reset resistor R26 to 1K and adjusts the reset capacitor C22.
Remove the reset capacitor C22, found that the nrst pin voltage is still around 2V, and then reset resistor R2 to 470R, found that the voltage rose to 3.3V, re-download the program, found that the return to normal, after repeated download, everything is normal.