1. Introduction to GK_F103VE_1.0 eSports main control.
Introduction to eSports main control design, personal profile, design introduction and resource acquisition_bilibili_bilibili 1. GK_F103VE_1.0 is an eSports main control board designed based on STM32F103VET6. The tutorial is based on the STM32CubeMX configuration driver, and the video tutorial will continue to be updated on station B.
2. Design concept: Give full play to the performance of F1 hardware, and achieve both learning and competition. It can be used to learn embedded technology and play video games. It is a development board that our school must learn for many years.
The development board mainly focuses on peripheral interface expansion, and all expansion ports use sockets, which provide reliable connections and facilitate function expansion.
3. STM32F103VET6 large-capacity F1 series, main parameters: 64K RAM, 512KROM, up to 72M main frequency, 100 pins, etc. It has complete internal functions and peripherals, making it very suitable for e-sports main control.
The peripheral hardware circuits try to maximize the F1 series hardware features, including LED, independent buttons, serial port (TTL, and RS485 interface), CAN interface, IIC interface, SPI interface, TFT interface,
AD/DA interface, SOID interface, and wireless module interface , dual-channel DC motor control interface, dual-channel stepper motor control interface, USB slave device, etc.




2. B station tutorial link
01_GPIO_LED, STM32CubeMX configures GPIO, GPIO usage of STM32, analysis of related GPIO function usage and design ideas provided by the HAL library_bilibili_bilibili
02_Debug, STM32CubeMX configures USART1 to realize formatted information output, library functions Use, printf function_bilibili_bilibili 03_GPIO_Key
, STM32CubeMX configuration GPIO input mode, independent key detection program design_bilibili_bilibili
04_EXIT, STM32CubeMX configuration EXIT, use of STM32 EXIT (external interrupt), external interrupt callback Function rewriting_bilibili_bilibili
05_DWT, using STM32's DWT peripheral to achieve precise time measurement_bilibili_bilibili
06_FSMC, STM32CubeMX configures FSMC, drives TFT, STM32's FSMC drives LCD, ILI9341 driver_bilibili bili_bilibili
06_TFT_XPT2046, TFT touch driver, STM32CubeMX configuration SPI, XPT2046 driver, touch control chip_bilibili_bilibili
07_1_UART_Tx, STM32CubeMX configuration UART, STM32 UART sending function, use serial port, data transmission_bilibili_bilibili
07_2_UART_Rx, STM32CubeMX configures UART, uses STM32 UART, and serial port interrupt reception. _bilibili_bilibili
07_3_UART_Rx_DMA, STM32CubeMX configures UART, uses IDLE of STM32, serial port IDLE interrupt + DMA reception_bilibili
07_4_UART_RS485, STM32CubeMX configures UART, serial port IDLE interrupt + DMA reception implements RS485 interface transceiver_bilibili Bilibili_bilibili
08_WSOS, transplantation and use of WSOS task manager_bilibili_bilibili
09_MPU6050, MPU6050 driver, STM32CubeMX configuration I2C, STM32 I2C use_bilibili_bilibili
10_I2C_OLED, STM32CubeMX configuration I2C, OLED driver, Use of the hardware I2C interface of STM32, use and settings of the relevant I2C functions provided by the HAL library_bilibili
10_I2C_OLED_2_DMA, STM32CubeMX configuration I2C, DMA, I2C+DMA drives OLED, use of the hardware I2C interface of STM32_bilibili _bilibili
11_SDIO, STM32CubeMX configures SDIO, SD card reading and writing, SDIO use of STM32, analysis of related SDIO function usage and design ideas provided by the HAL library_bilibili _bilibili
12_FatFs, STM32CubeMX configures FatFs, FatF+SDIO is hung on the SD card , realize file reading and writing, some functions of FatFs use _bilibili_bilibili
13_Font, FatF+SDIO reads the font file, and realizes TFT Chinese character display_bilibili_bilibili
14_1_Picture, STM32CubeMX configures FatFs+SDIO, and uses the FatFs file system Read the bmp format picture file and obtain the file picture phase_bilibili_bilibili
14_2_Picture_Dislay, bmp format picture display program design on TFT, STM32CubeMX configuration FatFs+SDIO_bilibili_bilibili 15_W25Q128
, STM32CubeMX configuration SPI, W25Q128 driver Design_bilibili_bilibili
16_Config, STM32CubeMX configures SPI, configures parameter structure design and power-off storage, W25Q128 static storage_bilibili_bilibili
17_USB_MSC_W25Q128, STM32CubeMX configures USB, MSC mode, uses W25Q128 as storage medium, realizes U plate. _bilibili_bilibili
18_USB_MSC_SDIO, STM32CubeMX is configured with USB + SDIO, the SD card is mounted, and the card reader is implemented_bilibili_bilibili
19_USB_FatFs, e-sports master control, USB and FatFs are mounted at the same time on W25Q128 to achieve file transfer_ Bilibili_bilibili
20_Font_Copy, eSports master, STM32CubeMX configures USB + SDIO+FatFs, copies the font file to W25Q128_Bilibili_bilibili
21_Font_Init, eSports master, the system automatically copies the font file to W25Q128 when it is powered on. Realize fast reading of dot matrix information. _bilibili_bilibili
22_1_DAC_voltage, electronic competition master control, STM32CubeMX configures DAC to achieve voltage output_bilibili_bilibili
22_2_DAC_signal, electronic competition master control, STM32 DAC realizes simple sine, square wave, and triangle signal output_beep bilibili_bilibili
Code Baidu cloud disk connection: Link: https://pan.baidu.com/s/1OsQORe8LkEf2xMbyiwNq9w Extraction code: 7rw8
3. GK_F103VE_1.0 development board interface introduction 1. Minimum system design a. Main chip STM32F103VET6, with backup battery, convenient Do RTC (real-time clock) experiment;
b. Isolate the digital ground from the analog ground, use TL31 to design a 2.5V reference voltage, supply VREF, ADC/DAC reference voltage 2.5V;
c. High-speed clock 8M, low-speed clock 32.768;
d. Design 6 Pin mode switching interface is convenient for setting the startup mode;
e. The download uses the standard 20-pin JTAG interface, which leads to PA13, PA14, PA15, PB3, and PB4, and can be downloaded by JTAG and SWD;
f. The mini USB interface is designed to realize USB MSC, HID and other slave devices.


2. LED interface circuit: Design 2 LEDs, connect the common anode to 3.3V, and light up at low level. LED is the best carrier for entry-level GPIO operations, and it is also an indicator of the operating status of electronic equipment.
3. The TF card interface
STM32F103VET6 comes with SDIO peripherals, which is very convenient for SD card operation. The hardware design uses a TF card holder, and the communication interface uses a 4-bit data width.
SDIO+FatFs can realize the reading and writing operations of files in the TF card to meet the system's demand for large-capacity files, such as font files and picture files, which we can
load through the memory card.

4. Button interface circuit: Design 5-way button input, independent button connection mode, configure GPIO with pull-up input, and input low level when the button is pressed. Buttons are important
input .
5. Buzzer and thermistor interface circuit The buzzer is driven by a transistor and is active at low level. The buzzer is an essential prompt device on electronic equipment. The thermistor is
a carrier used to experiment with MCU AD conversion. It can be used to verify the ADC acquisition results and measure the ambient temperature at the same time.

6. Serial communication interface circuit STM32F103VET6 has 5 serial port outputs, USART2 is used as RS485 interface output, and MAX485 is used as a level conversion interface chip. USART1, USART3 and
UART4 TTL level interfaces, the corresponding pins are FT (5V voltage resistant), the pin interface power supply is 5V, which facilitates the expansion of functional modules, and the input pins are connected to a pull-up circuit to
stabilize the input level. The USART1 and USART3 pins can also be mapped to I2C1 and I2C2, so the two interfaces are USART and I2C multiplexed.

7. SPI interface circuit SPI is the main interface for communication between MCU and peripheral function chips and modules. The SPI interface is mainly designed to facilitate the expansion of chips and modules with corresponding interfaces. The corresponding I/Os (PA15,
PB3, PB4, PB5) are all FT tubes. pin, the interface power supply uses 5V to enhance scalability. SPI3 conflicts with JTAG debugging interface I/O, so JTAG debugging cannot
be used .
8. The ADC/DAC interface circuit
STM32F103VET6 has two DAC outputs, and the corresponding interface pins are PA4 and PA5; two ADC inputs, and the corresponding interface pins are PA0 and PA1. The reference
voltage VREF of the analog circuit is 2.5V, the DAC output voltage is adjustable from 0 to 2.5V, the ADC can collect the voltage range from 0 to 2.5V, and the interface power supply voltage is analog 3.3V. At the same time, a protection diode is connected in series
to prevent external high voltage from flowing back into the development board. 3.3V power network. When designing analog circuits, ADC/DAC is an important data exchange interface.
9. DC motor control interface circuit: Design a dual-channel DC motor control and speed regulation interface, which requires an external drive board. Each motor uses 3 I/O controls, 1 speed regulation, and 2 control directions. The interface is directly
adapted to Taobao DC. Motor drive module, see picture below. The 6 I/Os of the interface are complementary outputs of TIM1 and can output SPWM signals.
10. Stepper motor control interface circuit design dual-channel stepper motor control and speed regulation interface. Each motor uses 3 I/O controls, 1 speed regulation, 1 control direction, and 1 enable. An external driver board is required. Drive
stepper motor, dual stepper motor drive interface can complete the control of two-dimensional pan/tilt.


11. TFT interface circuit STM32F103VET6 has an FSMC (variable static memory controller) interface. The TFT interface adopts the 8080 interface and can be driven directly by the FSMC interface.
The touch chip communication is connected using SPI2 and shares a common SPI interface with W25Q128 through chip selection time sharing. operate.

12. SPI FLASH interface circuit The development board is designed with W25Q128 static memory chip and 16M SPI FLASH, which can experiment with SPI communication, static storage, file system, making U disk, etc.
The communication interface uses SPI2, and SPI2 is also used in TFT touch chip communication. Communication between different chips is achieved through chip selection. The W25Q128 chip selection is PA6.

13. CAN interface circuit The CAN interface is a typical peripheral of the STM32 series MCU. Development based on STM32CubeMX makes driver design simple. It is
also very important to experiment with this interface on the development board. CAN uses TJA1050 level conversion chip.

14. Automatic download interface circuit The development board design is a USB to serial port interface. The chip uses CH340C. The RTS and DTR pins are used to control BOOT0 and RST to realize automatic download of the serial port program.
If there is no STLINK or JTAG debugger, USB MINI can be used. Interface cable for program download.

15. Wireless communication interface circuit The
wireless communication interface uses the NRF24L01 module, the SPI communication interface, and the SPI3 interface to realize wireless communication between development boards.

16. Power supply
circuit The power supply circuit uses the LM2596-5.0 DC/DC chip to step down the voltage. The power supply voltage of the development board is 7.2~24V. Use AMS1117-3.3A to convert the 3.3V power supply. Use
an inductor and 0Ω resistor to isolate the digital ground and analog ground.

4. Physical pictures

