Ai-Thinker's latest offline voice module factory firmware tutorial: Is the SDK open source?
Ai-Thinker
Ai-Thinker focuses on IoT module, antenna, RF test, cloud and PCBA service, to provide customers with one-stop solution
The VC series offline voice module released by Ai-Thinker adopts the solution of Unisound, and continuously optimizes and innovates the voice recognition technology. The offline recognition algorithm is deeply integrated with the chip architecture, providing customers with ultra-low-cost offline voice recognition solutions, which can be widely and quickly applied to smart homes, all kinds of smart small household appliances, 86 boxes, toys, lamps and other products requiring voice control.
Performance as below:
·Support self-learning of wake-up words (meaning that wake-up words can be added without programming, only the Chinese version can support them now)
·Supports Chinese and English (different firmware)
·90% recognition rate of 1~5m far field
·Support for RTOS lightweight systems
·Supports GPIO control and communication protocols such as UART, IIC, and SPI.
·Support serial port upgrade
There are two modules in the VC series and their development boards. The ex-factory firmware of the Development Board and the ex-factory firmware of the module are different.?
Ⅰ. Preparation before use
1. Communication interface connection
If the module is used for serial port connection, we recommend that you use the following interfaces for communication: RX1 and TX1.
If the development board is used, please debug directly with USB port. The connection indication between the module and SCM or TTL module is as follows:
The default serial port configuration of UART1:
·Baud rate: 115200
·Data bit: 8
·Stop bit: 1
·Check bit: None
·Flow Control: None
UART0(TX0:IOB8)Log output configuration
·Baud rate: 57600
·Data bit: 8
·Stop bit: 1
·Check bit: None
·Flow Control: None
2. Hardware description of the Development Board
VC-01 and VC-02 share the same development board: warm light
3. Burning instructions
There are two programming methods for the VC series:
JTAG Debugger and UART port
The JTAG Debugger uses a dedicated JTAG debugger to burn complete firmware. The software used is UniOneDownloadTool.exe. Generally, the firmware file name is: uni_app_release.bin
Serial port programming uses TTL module for firmware upgrade without any requirements on the module. The software used is UniOneUpdateTool.exe. Generally, the firmware file name is: uni_app_release_update.bin
The two programming methods are described in detail below:
①JTAG
You can only use a dedicated JTAG debugger for JTAG programming. Do not support J-link or other debuggers for programming.?
The connection between the JTAG debugger and the VC series is as follows:?
After the connection, insert the debugger into the computer (the debugger needs to install the driver, see the installation tutorial: Hummingbird-M-Production-Tool/M_Download_Tool_User_Guide.pdf), and open UniOneDownloadTool.exe:?
Burning process:
领英推荐
②UART serial port
The wiring of serial port burning is the same as that of communication mode, and there is no special attention. The most important thing is that the burned firmware has some requirements:
·For the first time, you must first install uni_app_release.bin or uni_app_debug.bin firmware under “uni_hb_m_solution\image_demo\Hummingbird-M-Update-Tool”. (Factory firmware burned)
·The firmware must be used build.sh update generated by instruction uni_app_release_update.bin
·The burning tool can only use: UniOneUpdateTool.exe
The following is the process of delay burning:
Note: If all ports are opened successfully, the background color will be yellow.
II. Use the firmware of the module
1. Instruction words and scripts
By default, some general commands and their corresponding scripts are written into the firmware of the module.?
For more Instruction words and scripts please access:
2. Script Description
Each script represents the instruction currently recognized by VC. The meaning of the instruction is: take"0x5a 0x00 0x00 0x00 0x00 0x5a" as an example.
·Start bit: 0x5a
·Instruction sequence number: indicates a unique instruction. 0x00 indicates the sequence number of the wake-up word.
·Reserved bit 1: fixed value: 0x00
·Reserved bit 2: fixed value: 0x00
·Checkbit: the XOR value of the first four digits, 0x5a XOR0x00 XOR0x00 XOR0x00 =0x5a
III. Use of factory firmware of Development Board
The instruction words of the firmware of the development board are the same as those of the module, except that the LED control function and the button wake-up function are added:
Ⅳ. Voice control process
V. Summary
The ex-factory firmware already has very good instructions, and the SCM can do corresponding processing according to the corresponding scripts. The most important byte of the script is the checkbit, which can be done in C language:
// Assume that the system wakes up: 0x5a 0x00 0x00 0x00 0x5a.
char ?start_bit=0x5a;
char ?cmd_num_bit=0x00;
char ?temp_num1_bit=0x00;?
char ?temp_num2_bit=0x00;
// Calculate the check bit.?
char ?check_bit= start_bit ^ cmd_mun_bit ^ temp_num1_bit ^ temp_num2_bit;
The most important thing is, does it support secondary development? In fact, this article has already made it clear.
*The firmware to be burned must be uni_app_release_updata.bin generated using the build.sh update command
Well, this is the end of the article! If you want to know more information, please follow us! Don't forget to give us a like~
Text Reference:
https://blog.csdn.net/Boantong_/article/details/123846788? spm=1001.2014.3001.5501
Contact us
Sample purchase:https://ai-thinker.en.alibaba.com/
Business cooperation: [email protected]
LinkedIn: https://www.dhirubhai.net/company/ai-thinker
Official website: https://en.ai-thinker.com
DOCS: https://docs.ai-thinker.com
Official Forum: https://bbs.ai-thinker.com
--
2 年Can I know wiring for UART burning?
IT Environment Manager at Wood
2 年Neval Dalgic what do you think?