Instructions for Serial Port Upgrade Tool¶
1. Overview¶
This document is our serial port upgrade tool PACK_ UPDATE_ TOOL. Exe User Manual: This tool needs to be run in Windows system and displayed on the computer in the form of graphical interface. Users can click the corresponding icon to select the required functions. It supports functions such as interface switching between Chinese and English display chip selection (CI110X/CI112X/CI130X), which is convenient for quickly packaging and generating firmware, and helps the module board update the firmware program with the USB serial port device.
Next, we will introduce the tool acquisition methods, tools, function tools, instructions, serial port protocol upgrade, common error handling and other aspects.
2. Tool acquisition method¶
- Log in Chipintelli Speech AI Development PlatformObtained from the database. The tool name is Serial Port Upgrade Tool VXX.rar.
- The tool has been stored in the project directory of the SDK package, such as CI11XX_ SDK\tools\PACK_ UPDATE_ TOOL.exe.
- In the project directory of the SDK package: Double click the (CI11XX_SDK sample internal sample_xxx firmware package upgrade. bat) file to open PACK_ UPDATE_ TOOL.exe.
3. Tools include functions¶
3.1. Introduction to Main Interface Functions¶
- Double click to run PACK_ UPDATE_ TOOL. Exe (The following is an example of V3.3.9). The main interface is shown in the following figure.
(1) Chip category selection : Select a chip category, including CI110X, CI112X and CI130X.
(2) Selection of language displayed on the tool interface : select the displayed language, including English and Chinese.
(3) Firmware packaging : Click to enter the firmware packaging page.
(4) Firmware upgrade : Click to enter the firmware upgrade page.
(5) Check version : click to check the version of the serial port upgrade tool, and the latest version can be updated through networking.
(6) Exit Tool : Click to exit the tool.
(7) Press “F1” to view the help : view more descriptions of the serial port upgrade tool offline.
3.2. Introduction to Firmware Packaging Functions¶
- Click the main interface (firmware packaging) button to enter the firmware packaging page shown below.
(1) Config
- Manufacturer No.: the corresponding number can be filled in, or the default value can be kept.
- Product No.: the corresponding number can be filled in, or the default value can be kept.
- Hardware name: Chinese/English can be filled in, or the default can be kept.
- Hardware version: it can be modified to the number of marked version, or it can be kept as the default.
- Software name: can be filled in Chinese/English, or keep the default, or keep the default.
- Software version: it can be modified to the number of marked version or kept as the default.
Note
Firmware name generated by packaging, consisting of software name and software version, such as Firmware_ V200.bin.
(2) User (user code storage partition)
- File path:./user_ code/user. bin. Or click the ellipsis icon on the right and select user.bin under the project directory (CI11XX_SDK sample internal sample_xxx firmware_user_code ).
- Reserved size: increase or decrease by an integer multiple of 0x1000, or keep the default.
- Current version: the version number of user.bin, which can be kept as the default.
(3) ASR (language model storage partition)
- File path:./asr/asr bin. Or click the ellipsis icon on the right and select asr.bin under the project directory (CI11XX_SDK sample internal sample_xxx irmware asr ).
- Reserved size: increase or decrease by an integer multiple of 0x1000, or keep the default.
- Current version: the version number of asr.bin, which can be kept as the default.
(4) DNN (acoustic model storage area)
- File path:./dnn/dnn bin. Or click the ellipsis icon on the right and select dnn.bin under the project directory (CI11XX_SDK sample internal sample_xxx irmware dnn ).
- Reserved size: increase or decrease by an integer multiple of 0x1000, or keep the default.
- Current version: the version number of dnn.bin, which can be kept as the default.
(5) Voice
- File path:./voice/voice bin. Or click the ellipsis icon on the right and select voice.bin under the project directory (CI11XX_SDK sample internal sample_xxx irmware voice ).
- Reserved size: increase or decrease by an integer multiple of 0x1000, or keep the default.
- Current version: the version number of voice.bin, which can be kept as the default.
(6) UserFile (command word information table storage partition)
- File path:./user_ file/user_ file. bin. Or click the ellipsis icon on the right and select user under the project directory (CI11XX_SDK sample internal sample_xxx irmware_ser_file )_ file.bin.
- Reserved size: increase or decrease by an integer multiple of 0x1000, or keep the default.
- Current version: User_ The version number of File.bin, which can be kept as the default.
- Add UserFile: No need to package user_ When file.bin is selected, the check box can be removed.
(7) ConsumerData (NVDATA data storage partition)
- Reserved size: increase or decrease by an integer multiple of 0x1000, or keep the default.
- Flash size: now supports 4M8M16M32M FLASH.
(8) Button function
- Chip category selection: select CI110X, CI112X and CI130X.
- Restore Default: restore all interface options to default values.
- Refresh address: After modifying the reserved size of each partition, click the refresh address, and then package the firmware.
- Package firmware: generate firmware files in the resource file directory.
- Firmware Upgrade: Switch to the Firmware Upgrade page.
- Parent Directory: return to the parent tool main interface.
- Exit Tool: Exit the tool.
3.3. Introduction to Firmware Upgrade Functions¶
- Click the main interface (firmware upgrade) button or the firmware packaging page (firmware upgrade) button to enter the firmware upgrade page shown below.
(1) Firmware path
- Select Firmware: Select the path where the firmware is located.
(2) Serial port selection configuration and upgrade progress bar
- COMX: Select the COM number used by the USB serial port.
- % X: Firmware upgrade progress percentage.
- White box: text prompt during upgrade.
- Serial port baud rate selection: 115200/230400/460800/921600/1000000/2000000.
- Check box of COMX number: check the used COMX to display a green tick mark.
(3) Authentication document
- Authentication File: if checked, several authentication files will be displayed. The authentication file is used when connecting to the cloud online&offline.
- Path: Keep the default. Or select (CI11XX_SDK sample internal sample_xxx firmware) in the project directory.
Note
The directory where authentication files are stored is: CI11XX_ SDK\sample\internal\sample_ xxx\firmware\authentication_ File valid authentication file.
(4) Encryption
- Encryption: no/standard encryption/custom encryption algorithm.
- Password/Path: When standard encryption is selected as the encryption method, the password is entered here. When the user-defined encryption algorithm is selected, the algorithm file path is selected here.
(5) Tool Version Information
- It contains the tool version number and SPI partition information.
(6) Button function
- Force Update All Partitions: When checked, all partitions will be updated. If it is not checked, only the modified part will be automatically checked.
- Erase NV: When checked, the NV information in FLASH will be erased during the upgrade.
- Select All: User_ The version number of File.bin, which can be kept as the default.
- Chip type selection: CI110X/CI112X/CI130X.
- Parent Directory: returns to the parent interface.
- Exit Tool: Exit the tool.
4. Tool instructions¶
4.1. Firmware packaging¶
- Step 1 : Enter the firmware packaging interface as shown below, fill in the Config configuration information, and use the default firmware partition information area.
- Step 2 : Click the button (Package Firmware) in the above figure, and the following prompt box will be displayed after successful packaging.
After clicking the (Package Firmware) button, if other error prompt boxes appear, please check (Chapter 6 - Common Error Handling) to solve the problem
4.2. Firmware upgrade¶
- Step 1 : Enter the firmware upgrade interface as shown below.
- Step 2 : Configure the following information.
(1) Select firmware: Find the firmware to download. The default is the firmware packaged in Section 4.1.
(2) Authentication file: offline SDKs are generally not used. Please refer to Section 4.3 of this document when leaving online@offline SDKs.
(3) Encryption: Please refer to SDK document Instructions for Use of FLASH Encryption Function.
(4) Password/path: click the “eye” icon to display the password when using standard encryption. The path ‘…’ can only be opened when using a custom encryption algorithm.
(5) Force update of all partitions: Force update of all partitions such as bootloader. If it is not checked, only the changed part will be updated.
(6) Erase NV: Erase the NV data stored in the original FLASH, which is selected by default.
(7) Select All: When a large number of upgrades are performed, all serial ports can be selected.
- Step 3 : Connect the hardware.
(1) When you get here, you need to connect the board and plug in the microphone. The SDK is configured with UART0 as an upgraded serial port by default. The USB TX is connected to the RX0 of the voice board, the USB RX is connected to the TX0 of the voice board, the USB GND is connected to the GND of the voice board, and the PG is shorted with a jumper cap or DuPont cable_ When the EN pin reaches 3.3V, enter the upgrade mode.
(2) After the corresponding COM number, you can modify the serial port baud rate. Here, the default 921600 is used. Check the blue box after the corresponding COM number and select the serial port.
(3) Prepare the above steps, use the cold start mode, that is, connect the 5V of USB to the 5V interface of the board power supply, and then power on to download the program. The successful download interface is shown below.
4.3. Authentication Documents¶
- Online&offline SDKs are generally not used, but are not needed for online SDKs. Open the serial port tool PACK_ UPDATE_ TOOL. After exe , an empty directory (authentication_file failed) will be generated, where you can put the authentication file.
(1) When authentication_ If there is no authentication file in the file fail directory, click the blue box behind the “Authentication File” in the firmware upgrade interface, and the following results will be displayed, 0 authentication files will be displayed, and there will be no available authentication file.
(2) If you need to use the authentication file, store the authentication file in authentication_ In the file valid directory, the total size of authentication files must not exceed 4K. Save 3 authentication files to authentication_ After the file valid directory, click the blue box behind the “Authentication File” to see the following results. At the same time_ The invalid empty directory is automatically generated under the file directory.
(3) After the upgrade is completed, the authentication file interface will display “0 authentication files”, which means that the authentication file has been successfully burned, and the authentication file under the valid directory will be moved to the invalid directory.
5. Serial port protocol upgrade¶
- The serial port protocol upgrade is another upgrade mode besides the cold start mode. That is, when the equipment is not powered off, directly check the serial port tool PACK_ UPDATE_ TOOL. The exe upgrade interface corresponds to the serial port number to complete the fast upgrade without the need for hardware cold start. The steps for using this upgrade method are described in detail below.
5.1. Configuration introduction¶
- Open the upgrade tool PACK_ UPDATE_ TOOL. After exe , config will be generated Ini configuration file, which is some default configuration information of the upgrade tool. Open the config.ini configuration file with a code editor and find the following code location.
[UPDATE]
Reset command=//Serial port protocol command
Send reset baudrate=//Serial port protocol baud rate
-
The main function of the two commands is to fill the serial port protocol in the upgrade tool configuration file config In ini, send the serial port protocol reset command to the board through the upgrade tool to achieve the effect of power on and upgrade again. Refer to step 4.4.2 for specific use.
-
The default SDK configuration is as follows:
(1) UART0: Upgrade interface log printing interface.
(2) UART1: Serial port protocol interface.
5.2. Instructions¶
- Step 1 : Modify the code (directory: CI11XX_SDK sample internal sample_xxx src user_config. h).
(1) Open the project code and modify the user_ config. h allows UART0 to be used not only as an upgrade interface, but also as a serial port protocol interface.
#define UART_ PROTOCOL_ NUMBER (HAL_UART0_BASE)//UART0 is selected for the serial port protocol interface
(2) At user_ Config. h, add a macro, and modify the log printing interface to UART1 or UART2.
#define CONFIG_ CI_ LOG_ UART HAL_ UART1_ BASE//or HAL_ UART2_ BASE
(3) After modification, recompile the code. First, upgrade the program to the board according to the cold start method in Step 4.2, so that the current board supports the serial port protocol upgrade method.
- Step 2 : Modify the configuration file config.ini.
(1) Open the config.ini configuration file with a code editor, supplement the values following the equal sign of the following code, and save.
[UPDATE]
Reset command=A5 FC 05 00 A1 95 04 01 00 00 00 3B 01 FB//Reset command
Send reset baudrate=9600//The baud rate is the same as the user_ Macro UART of config. h_ PROTOCOL_ BAUDRATE values are consistent
(2) Now it can be realized. The device is not powered off. Just select the serial port in the upgrade tool to upgrade the function.
Note
When the board is not powered off, there is no welcome speech for upgrading in this way. Only when the board is powered on again can there be a welcome speech.
6. Common error handling¶
6.1. Partition User: The file cannot be opened or does not exist. Please check the path!¶
- If the following prompt appears, it generally means that the program has not been compiled and user.bin has not been generated.
-
For how to compile CI130X, please refer to the SDK document CI130X SDK Quick Start (Section 4.3 Burning Method - Step 2).
-
After the compilation is completed_ SDK\internal\sample_ xxx\firmware\user_ The user.bin that generates application code in the code directory.
6.2. Partition ASR: The file cannot be opened or does not exist, please check the path!¶
- If the following prompt appears, it means that other files such as asr.bin have not been generated through (batch processing tool).
6.3. Partition User: The file is too large, exceeding the reserved size!¶
- If the following partition related prompts appear, you generally need to modify the reserved size of the User partition.
-
If the actual user partition requirement is 0x28046 and the reservation is only 0x26000, you can modify and add 0x3000 to reserve 0x29000, and select another partition (or DNN or ASR or Voice) to decrease 0x3000 correspondingly.
-
The reserved size is configured as an integer multiple of 0x1000. After the reserved size is configured, the address needs to be refreshed.
-
If there are many command words made by the customer, the reserved size of the UserFile partition generally needs to be increased.
-
If all partitions have been adjusted to the limit and are still insufficient, it means that the FLASH size cannot meet the requirements. Either replace a larger FLASH or reduce some partition resources. After replacing the Flash, modify the Flash size according to the Flash model.