stm_ K210 facial recognition

1. Communication between k210 and stm32

1.1 Experimental premises

This tutorial uses stm32C8T6, and k210 requires running the program in K210-AI (stm32_pico_arduino) to start the experiment Stm32 * 1 K210 perspective module * 1 (requires SD card (with AI model inside) and camera) USB to TTL module * 1

1.2 Experimental wiring

stm32usb to ttl
PA2RXD
GNDGND
STM32k210
PA3TXD
GNDGND
VCC5V

Wiring as shown in the diagram: image-2023060600002

image-2023060600005

This type of wiring is not necessary for the RXD of k210 and the TXD of USB to TTL, as it was not used in the experiment.

1.3 Main code explanation

After the above program, if you are running this routine, k210_ The members of the msg structure have corresponding values and are processed through serial port printing K210_ Msg: is a structure that receives information, and its main members are

1.4 experimental phenomena

  1. After connecting the cable, the K210 perspective module runs offline. Please check 【6.2 K210 as coprocessor】--【ReadMe】
  2. Set the serial port assistant to the interface shown in the figure image-2023060600004
  3. Then run the facial recognition routine, and the serial assistant will print out the important information transmitted from k210 to stm32, as shown in the following figure image-2023060600001

Face recognition only transmits K210_ The five Member variable of msg are x, y, w, h, and id. ID: The information is Y/N, with Y: recorded faces and N: mismatched faces