Burning and Debugging Tool(Windows)
Brief Introduction
"Telink Burning and Debugging Tool (BDT)" applies to all engineers who want to develop applications based on all Telink SoCs including B85M series and B91, B92, TL721X, TL321X, TC321X, TL751X.
This document serves as a guide on how to use the "Telink Burning and Debugging Tool (BDT)".
Function Overview
During SDK development, by using "Telink Burning and Debugging Tool (BDT)", firmware can be directly downloaded into the target board (e.g. development board) via "USB" mode or "Burning EVK" (abbreviated as EVK) mode.
Its main functions include "Erase flash sector", "Download firmware", "Activate MCU when communication failed", "Access memory space including Flash/ Core/ Analog/ OTP", "Read/Write global variable" and "View USB log".
Operation Guide
Download Firmware
Connect Hardware
Before using "Telink Burning and Debugging Tool (BDT)", it's needed to connect the target board with PC.
There are two methods to connect the target board with PC, as shown below.
Method 1: Directly connect the target board with PC via USB.
This method only applies to target board with USB interface and MCU supporting USB function, e.g. a dongle board.
Method 2: Connect the target board with PC via Telink "Burning EVK" TLSR8266ET56.
(1) Connect "Burning EVK" with PC via USB. Observe the indicator light of "Burning EVK", the indicator light flashes once, indicating that "Burning EVK" is successfully connected to the PC.
(2) Connect target board with "Burning EVK".
There are two methods to connect the target board with the "Burning EVK".
a. Connect the target board with the "Burning EVK" via USB interface directly, as shown below. This connection method only applies to target board with USB interface and MCU supporting USB function, e.g. a dongle board.
b. Connect the target board with the "Burning EVK" via Swire (single wire) interface, as shown below.
After connecting the target board to PC via USB method or "Burning EVK" method, there are two methods to download firmware into the target board, which respectively correspond to the two hardware connection methods above.
Connect Device
Before downloading firmware into the target board, please ensure that the device have been found by BDT as the following figure.
If BDT does not find the device, as shown below, you can click "Refresh" to check the available devices.
If BDT finds more than one device, all devices will be listed as shown in the figure below. After clicking the button "Refresh", the first device will be connected to BDT by default. If you want to connect other devices, you can select the specified device as shown below.
Download Firmware to "Flash" via "USB" Mode
Before using "USB" mode to download or debug MCU, please ensure that the specified MCU supports USB function and its USB function is available.
Then user can follow the guide in this section to download firmware into specific flash space of the target board via "USB" mode.
Step 1: Select chip type of the target board, e.g. B92_3V3. The following two methods are supported.
-
Method 1: Use the drop-down menu to select chip type.
-
Method 2: Press the shortcut key combination "Ctrl + Q" to switch chip type.
Step 2: Select the download mode as "USB" and the following two methods are supported.
-
Method 1: Use the drop-down menu to select USB download mode.
-
Method 2: Press the shortcut key combination "Ctrl + W" to switch to USB download mode. The drop-down menu will automatically show the current download mode after each switch.
Step 3: Click the "Setting" button to open the setting dialog window, and select the "Flash" option. The user can use any of the following methods to set the flash start address offset of the target firmware storage, e.g. 0x000000 (default option).
-
Method 1: Use the "Download Addr" drop-down menu to select the available offset options.
-
Method 2: Enter the offset address in the edit box for "Download Addr".
Note:
- The user can also configure the "SRAM"/"OTP" setting option to download the target firmware to the target area in the SRAM or OTP.
Step 4: Select the target firmware file to be downloaded into the target board.
(1) Click File -> Open, to open the file select window.
(2) In the file select window, select the target bin file (e.g. Telink.bin) and then click the "Open" button.
The file path will be displayed at the bottom of the main interface. Every time a new file path is opened via the file selection window, it will be added to the submenu of "File->Reopen". This simplifies firmware selection in subsequent operations by allowing the user to directly select the target file path in the submenu of "Reopen".
Step 5: Check the connection status between the target board and the PC to make sure it is working properly.
-
If the connection status is normal, the left bottom of the main interface will display "usb device: ok" or "evk device: ok".
-
If the left bottom of the main interface displays "usb device: not found", it indicates the connection between the target board and the PC is not available.
Step 6: Download the selected file into the target board.
By clicking the "Download" button, the selected firmware file will be downloaded into the specified flash space of the target board via USB mode. The Log window will display the corresponding log information, as shown below.
Step 7: Reset MCU to make the newly downloaded program run without the need to power cycle MCU (unplug/plug from Burning EVK). User can follow either of the following two methods to make MCU boot and run.
- If "manual mode" is selected via the drop-down menu, after the firmware burning, the user can click the "Reset" button in the top right corner of the tool to manually reset the MCU.
- Users can also select "auto mode" via the drop-down menu before firmware burning, so as to enable auto reset after firmware burning.
Download firmware into "Flash" via "EVK" mode
Before using "EVK" mode to download firmware, please ensure that target board is connected to PC via "Burning EVK" method and the single wire communication of the target board is established.
User can follow the guide in this section to download firmware into specific flash space of the target board via "EVK" mode.
Step 1: Select chip type of the target board, e.g. B92_3V3. The following two methods are supported.
-
Method 1: Use the drop-down menu to select chip type.
-
Method 2: Press the shortcut key combination "Ctrl + Q" to switch chip type, the drop-down menu will automatically display the current type after each switch.
-
Method 1: Use the drop-down menu to select "EVK" download mode.
-
Method 2: Press the shortcut key combination "Ctrl + W" to switch to "EVK" download mode. The drop-down menu will automatically show the current download mode after each switch.
Step 3: Click the "Setting" button to open the setting dialog window, and select the "Flash" option. The user can use any of the following methods to set the flash start address offset of the target firmware storage, e.g. 0x000000 (default option).
-
Method 1: Use the "Download Addr" drop-down menu to select the available offset options.
-
Method 2: Enter the offset address in the edit box for "Download Addr".
Note:
- The user can also configure the "SRAM"/"OTP" setting option to download the target firmware to the target area in the SRAM or OTP.
Step 4: Select the target firmware file to be downloaded into the target board.
User can select the target file via the "File -> Open" or "File -> Reopen" (if it's available in the submenu), the file path will be visible at the bottom of the main interface.
Step 5: Check the connection status between the target board and the PC to make sure it is working properly.
-
If the connection status is normal, the left bottom of the main interface will display "usb device: ok" or "evk device: ok".
-
If the left bottom of the main interface displays "usb device: not found", it indicates the connection between the target board and the PC is not available.
Step 6: Download the selected file into the target board.
By clicking the "Download" button, the selected firmware file will be downloaded into the specified flash space of the target board via "EVK" mode. The Log window will display the corresponding log information, as shown below.
Step 7: Reset MCU to make the newly downloaded program run without the need to power down the MCU. User can following either of the following two methods to make MCU boot and run.
- If "manual mode" is selected via the drop-down menu, after the firmware burning, the user can click the "Reset" button in the top right corner of the tool to manually reset the MCU.
- Users can also select "auto mode" via the drop-down menu before firmware burning, so as to enable auto reset after firmware burning.
Download firmware into "SRAM" or "OTP"
By default, the "Setting" option is set as "Flash", i.e. by clicking the "Download" button, the target firmware will be downloaded into the "Flash" space of the target board.
User can also change the "Setting" option to "SRAM" or "OTP". In this case, by clicking the "Download" button, the target firmware will be downloaded into the target board's "SRAM" or "OTP" space correspondingly.
After the target file is downloaded successfully, the target board will not automatically run the new firmware in "manual mode", so user needs to click the "Reset" button to make program boot. User can also select "auto mode" via the drop-down menu before downloading, so as to enable auto MCU reset.
If target board supports OTP function, user can download firmware into "OTP".
Multi-address Download
Sometimes, it is necessary to download more than one firmware into different addresses of Flash, SRAM or OTP.
For example, users can follow the steps below to download "Telink.bin" to the addresses "0x00000000" and "0x00020000" of Flash.
Step 1: Select the target memory space (such as Flash) to store the firmware to be downloaded.
Step 2: Click "Tool -> Multi-address download" or press the shortcut key "Ctrl+P", so as to open the "Multi-address Download" interface.
Step 3: Click the "Add" button so as to add firmware file and set target address.
Step 4: Add the path of firmware 1 to the list and set the offset of starting address to store this firmware.
(1) First, select the first line (No.1), and click the "File" button to add target bin file (e.g. "Telink.bin") to the list. The corresponding directory will be shown in the "File Path" column.
(2) Then set the offset of starting Flash address to store this firmware in the "Start Address(H)" column.
To ensure that the target area for firmware storage is valid, the tool will automatically calculate the size and end address of the firmware, and then show the calculation result in the "File Size(Bytes)" and "End Address(H)" column.
Step 5: Refer to step 4 to add the path of firmware 2 to the list and set the offset of starting address to store this firmware.
Step 6: Click the "Download" button to download the added firmware 1 and firmware 2 into the specific memory location of the target board.
Step 7: After downloading all firmware into the target board, click the "Reset" button to make program run without the need to power cycle the target board.
OTP Start Information Download
(1) Configure OTP clock, take the chip B80 as an example, OTP address 0x3ff8 write data 0x060301bf.
- Function: Write the MCU digital register 0x603 to 0x01 to configure OTP clock.
(2) Start code, take the chip B80 as an example, OTP address 0x3ff0 write data 0x060298bf.
- Function: Write the MCU digital register 0x602 to 0x98, the MCU starts the execution of the code, and the program starts to run.
(3) Move the code into RAM, take the chip B80 as an example, OTP address 0x3ff4 write data 0x0001f03f.
-
Function: MCU moves the contents of the first 7936 bytes in OTP from address 0 to address 0 of RAM.
-
Data length = 0x1f0 * 16 = 7936 bytes
The following method can be used to calculate the size of the program that the OTP needs to move into ram.
When the OTP is powered on for the first time, both the vector and ram code fields need to be moved to the ram. The calculation formula for the size of these two fields is:
The base address of the LMA of the ram code + ram code size (the reason why the vector size + ram_code size is not used for calculation is that there may be alignment factors that cause the size to be calculated incorrectly)
Because the length information in the start information is: actual length/16. Therefore, the general calculation formula of the length information in the start information is summarized as follows:
((The base address of the LMA of the ram code + ram code size) (16 bytes alignment)) / 16
So the final calculation formula of the following lst file is: 0x220 + 0xAEC, the size after 16 bytes alignment is 3344, 3344 / 16 = 209(0xd1)
Just write the data 0x0000d13f to the corresponding OTP address 0x3ff4.
Taking the chip B80 as an example, users can download the OTP start information according to the following steps.
Step 1: Open the BDT tool and select the B80 chip.
Step 2: Click Tool -> Memory Access, enter the start information and its length to be written in the OTP address, and press the "Enter" key in the data edit box, the corresponding information will be burned into the OTP address.
Erase Flash Sector
The "Erase Flash Sector" function is used to erase specific Flash space starting from specific address in 4kB units.
For example, to erase 64kB Flash space starting from address 0x00000000, user can follow the steps below.
Step 1: Click the "Setting" button to open the Setting dialog. Select the "Flash" setting option.
To set the starting address of Flash space to be erased, e.g. 0x000000000 (default option: 0x00000000), user can either select the offset option (if available) via the drop-down menu of "Erase Flash Addr" or directly input offset address in the edit box.
Step 2: To set the size of Flash space to be erased in 4kB units, e.g. 64kB (default option: 512kB), user can either select the size option (if available) via the drop-down menu of "Sector Erase Size" or directly input the size in the edit box.
Step 3: Click the "Erase" button to start erasing the specified Flash space of the target board.
Flash De-protection
After the Flash is write-protected, it will lead to unsuccessful erasing and burning, so it is necessary to remove the protection before operating the Flash. The steps to remove the protection from Flash are as follows. (This function has been supported since version v5.7.0)
Step 1: Open the BDT tool and select the chip type.
Step 2: Click the "Unlock" button, and "unlock ok" appears in the log, indicating that the protection was removed successfully.
Flash Protection Status
Since the current SDK adds write protection to the Flash by default, the write protection status will be obtained before erasing or burning the Flash. The procedure to get the Flash protection status is as follows. (This function is supported since v5.7.8)
Step 1: Open the BDT tool and select the chip type.
Step 2: Click "Download" or 'Erase', if the flash is protected, the log will prompt "Please unlock flash first!".
Step 3: Click the "Unlock" button, if "Flash unlock ok!" appears in the log, it means that the protection is removed successfully.
Step 4: Click "Download" or "Erase" button again, if "Flash status: unlocked" appears in the log, it means that the current flash is not in write-protect status, and can be burned and erased normally.
Flash Automatic Removal of Protection
If you want to automate the unlock operation before each Download or Erase, click the Auto Unlock button.
Step 1: Open the BDT tool and select the chip type.
Step 2: Select "Auto unlock".
Step 3: Click "Download" or "Erase".
Flash Information Inquiry
If you need to check the current flash's mid, status, lock area, and uid, click the Flash info button.
Step 1: Open the BDT tool and select the chip type.
Step 2: Click the "Flash info" button.
Cache Analyze
When the chip is powered on to carry the code, if the code to be run is not in the cache, it will automatically read the function from Flash or OTP into the cache. This function is mainly to analyze which address of the flash the cache move code fetches data from, and what the data content is, and compare the analyzed data with the original data to determine whether the cache move code is correct. The premise of this function is that the chip has downloaded the program and runs it, and then parses it through the following steps. (This function has been supported since version v5.7.0)
Step 1: Open the BDT tool, select the chip type and choose the firmware that the chip needs to download.
Step 2: Click the "Cache" button. In the figure below, the marker "1" is the flash address where the moving code is located; the marker "2" is the data stored in the corresponding flash address; the marker "3" represents the test result. "OK" means the data in the moving code is correct; "FAIL" means the data in the moving code has error.
In the event of a cache data error, the "rawdata" represents the value of the correct data corresponding to the flash address; the "status" represents the result of comparing "rawdata" with the data in the cache. If the "status" is "T", the data of them is the same; if the "status" is "F", the data of them is inconsistent.
Activate MCU
The function of "Activate MCU when communication with target board failed" only applies to Swire connection between "Burning EVK" and target board in "EVK" mode, i.e. it does not support "USB" mode or USB connection between "Burning EVK" and target board in "EVK" mode.
When firmware burning fails, please ensure the target board is connected with "Burning EVK" via Swire, and then click the "Activate" button to enable this function to activate the MCU.
Debug
After MCU starts running, to access memory space (Flash/Core/Analog/OTP), users can directly press the shortcut key combination "Ctrl + M" or click "Tool -> Memory Access" to open the "Memory Access" window as shown in the figure below.
Items | Value list | Default | Shortcut |
---|---|---|---|
MCU Type | B85m/B91/B92/TL721X/TL321X/TL751X | TL751X | Ctrl+Q |
Communication Mode | EVK(Burning EVK)/USB | EVK | Ctrl+W |
Operation Destination | Flash/Core1/Analog2/OTP | Core | Ctrl+E |
Operation Size(Unit: Byte) | 1/2/4/8/16 | 1 | Ctrl+R |
Address | 0 | 0 | Ctrl+A |
Data | 0 | 0 | Ctrl+D |
Access Memory
(1) Read Data From Memory Space
To read data from specific memory space (Flash/Core/Analog/OTP), user can follow the steps below:
Step 1: Select MCU type (e.g. "TL721X") and communication mode (e.g. "EVK") with target board in the "Memory Access" window.
Note:
If you select "USB" mode to communicate with target board, please ensure that the selected MCU supports USB function and its USB function is available.
Step 2: In the "Memory Access" window select the operation target (e.g. "Core") and set the operation size (e.g. "16").
Note:
- If "OTP" is selected as the operation target, make sure that the selected MCU supports "OTP" function.
- To set the operation size, the user can select the size (if available) via the drop-down menu, or set the size directly in the edit box.
- The maximum operation size is 1MB.
Step 3: Move mouse cursor to the "addr" box, and then input the offset of the starting address to be read (e.g. "0x040000"). Keep the cursor in the "addr" box, by clicking the "Tab" key, user can read data from the specified memory space.
Note:
- Every time when clicking the "Tab" key to initiate a memory reading operation, the value of the editable box will be saved, so that you can directly select it via the drop-down menu next time.
- When reading memory space (e.g. Core) larger than 1kB, the read data will be automatically saved to a file named "Read.bin" under the "user" folder. User can also use specific command line to change the name of file to save the read data. Refer to section 2.8 Command line for details.
(2) Write Data into Memory Space
To write data into specific memory space, user can follow the steps below:
Step 1: Select MCU type (e.g. "TL721X") and communication mode (e.g. "EVK") with target board in the "Memory Access" window.
Note:
If you select "USB" mode to communicate with target board, please ensure that the selected MCU supports USB function and its USB function is available.
Step 2: In the "Memory Access" window select the operation target (e.g. "Core") and set the operation size (e.g. "16").
Note:
- If "OTP" is selected as the operation target, make sure that the selected MCU supports "OTP" function.
- To set the operation size, the user can select the size (if available) via the drop-down menu, or set the size directly in the edit box.
- The maximum operation size is 256 bytes.
Step 3: Move mouse cursor to the "addr" box, and then input the offset of the starting address to be written (e.g. "0x040000").
Note:
When the operation target is selected as "Core", if the address you set is less than the starting address of "SRAM", the target memory space that is actually accessed is digital register; if the address you set is greater than the starting address of "SRAM", the target memory space that is actually accessed is SRAM.
Step 4: Write data to the specified address.
Move mouse cursor to the "data" box, and then input the target data to be written. Keep the cursor in the "data" box, by clicking the "Enter" key, user can write the specified data into the specified memory space.
Note:
When inputting the data, bytes must be separated from each other with space, as shown below:
Operate Variable List
Before viewing all global variables, please ensure that the ".lst" file and the ".bin" file are placed under the same directory, the following two cases are supported:
Case 1: If only one pair of ".lst" file and the ".bin" file are placed under the same directory, this ".lst" file will be selected automatically.
Case 2: If there are multiple ".lst" files and the ".bin" file are placed under the same directory, the ".lst" file with the name same as the selected ".bin" file will be selected automatically.
For example, if you select the "Telink.bin" file, the "Telink.lst" file will be selected automatically. If there is no "Telink.lst" and only one "xxx.lst" file is placed under the directory of the selected "Telink.bin" file, this sole "xxx.lst" file will be selected.
(1) Update Variable List
To look all global variables, user can select the "Tdebug" page, move mouse cursor to variable list, and then right click the mouse to choose "Refresh" or press the shortcut key "F3". Each time you press "F3", the variable list can be updated once.
(2) Sort Variables
As needed, user can also right click mouse, and choose the "Sort by address" to sort all variables by address from low to high (default), or choose the "Sort by name" to sort all variables by ASCII value of variable name from A to Z (compare the first different character).
(3) View Variable Above 4 Bytes
If a variable's length is larger than 4 bytes, by clicking the "…" in the "Value" column of the "variable list", its value will be available in the log window on the right.
If a variable's length is greater than 1024 bytes, all values of the variable will be saved in a file named "Read.bin".
(4) Modify Variable Value
Variables whose length does not exceed 4 bytes support direct write operations, double clicking the corresponding box in the "Value" column to directly modify its value.
For example, to modify the value of the variable "g_pm_multi_addr" in the address "0x000401e0" to "0x00000025", user can follow the steps below:
Step 1: Double click the box in the "Value" column corresponding to the specified variable (e.g. "g_pm_multi_addr") to make the box editable.
Step 2: Input new variable value (e.g. "0x00000025") to replace the old value ("0x00000000").
Step 3: Press the "Enter" key to write the new value into the specified variable's address.
Debug MCU
Before using the buttons including "Run", "Pause", "Step" and "PC" to debug MCU, please ensure that the selected MCU supports this function.
In the sub-sections below, the MCU "B85" is taken as an example to introduce this function.
(1) Run MCU
After clicking the "Pause" or "Step" button, user can make MCU continue to run from the current position by clicking the "Run" button. Please click the "PC" button to check the MCU status, read the PC and make sure the program runs again.
(2) Pause MCU
To view the details of the MCU status, user can click the "Pause" button to pause MCU. Click the "Run" button, MCU will continue to run from the current position.
(3) Step MCU
If the communication with target board is available, user can click the "Step" button to view the current position of instruction step by step.
Both "Trace MCU" and "Step MCU" support two modes, as shown below.
(1) If the "Single step" mode is selected, MCU will enter single step mode, in which one PC tracing will be implemented after clicking the "PC" or "Step" button.
(2) If the "continuous" mode is selected, MCU will enter continuous mode and implement continuous PC tracing or make MCU step continuously.
To cancel "continuous" mode, user can either switch mode to "Single step" mode, or click the "Run"/"Pause" button.
If the target firmware (bin file) and "xxx.lst" file are under the same directory, user can view more details by selecting "View -> interp .lst" and clicking the "PC" button to analyze the "xxx.lst" file, as shown below. Refer to 2.6.2 Operate Variable List.
(4) Trace PC
If the communication with target board is available, user can click the "PC" button to view the current position of instruction, as shown below:
(5) Stall MCU
When there is no enough time to view the status of MCU, user can click the "stall" button to stall MCU and view the status of MCU or change the configuration of MCU.
Note:
In EVK mode, only the EVK burned with the "Firmware_v3.2.bin" (or higher version) supports this function.
(6) Start MCU
After stalling MCU, click the "start" button to start MCU, so that the MCU will run from the SRAM.
Single-wire synchronization
Before setting Single-wire synchronization speed, please ensure the following items:
(1) Power supply is normal;
(2) MCU is not in "Low Power" mode;
(3) Single wire function of MCU is available;
(4) System clock is normal.
When connection fails to be established between "Burning EVK" and the target board, user can try to set Swire(single wire) synchronization speed to improve communication. Note: Swire register address may vary with different chip types.
(1) Change the speed of Master and the speed of Slave in the four editable boxes, as shown below. Note: Swire register address may vary with chip types.
(2) Click the "SWS" button to implement Swire synchronization.
Before downloading firmware to target board or debugging MCU, it is suggested that each time the MCU is powered on, user should implement one Swire synchronization to check whether communication with target board is normal.
If the status of communication with target board is wrong, user can solve the problem according to the methods mentioned at the beginning of section 2.5.
Command Line
Users can also use the command line to access memory or download files to the target board. In the following subsections, "read core" is used as an example.
Single Command Line
Step 1: Open command line input window by selecting the "Tool->Cmdline Input" or pressing the shortcut key combination "Ctrl + I".
Step 2: Input the needed single command as follows and then press the "Enter" key. The file with the specified named will be available in the specified location.
Multi-command Line
The tool supports multi-command line operation.
All commands need to be separated from each other by semicolon, as shown below:
Log Window
This tool supports USB print function, so MCUs with USB function can use USB print function to output information in log window on PC side.
Step 1: Click the "View -> usb log -> ASCII" to open usb log window.
Step 2: In the "usb log" mode, all output characters will be displayed in "Ascii" mode。
Step 3: Click the "View -> usb log" again to exit the "usb log" mode.
Help
By clicking the "Help -> Command line", all commands will be shown in the log windows of the "Download" or "Tdebug" page.
By clicking the "Help -> User guide", the embedded "Help" document "Telink Burning and Debugging Tool (BDT) User Guide" will be opened, as shown below:
To get more information about Telink, user can click the "Help -> About Telink". Then you can jump to the official Telink website in your browser.
Upgrade Firmware
User can follow the steps below to upgrade firmware of "Burning EVK".
Step 1: Click "Help -> Upgrade" to open the "Upgrade EVK" dialog window.
Step 2: Click the button "Read FW Version" to check the current firmware version.
Step 3: Click the "Load…" button to load the new firmware.
Step 4: Click the "Upgrade" button to upgrade the new firmware into the "Burning EVK". Note: User must power cycle the EVK before using it.
Tools Guide
This section mainly introduces the built-in tools of the BDT, including the functions of the tools and how to use them.
BQB Tool
Function Description (BQB Tool)
This tool has two main functions:
-
Configure and generate firmware for BQB testing according to requirements (bin files of both Flash and SRAM types), with configurable options including: UART pins, PA control pins, TX energy, internal and external capacitors, internal power supply mode and the location of calibration parameters. In addition, the generated firmware can be downloaded directly into the DUT through the tool (by way of Swire). Note: The above BQB test firmware is a UART two-wire test program, and the baud rate of serial communication is 115200.
-
Sending and receiving packet test
Interface Composition and Instructions (BQB Tool)
The tool is mainly composed of two parts: the firmware download interface and the test interface, as shown in the following figure.
(1) Chip Selection
Selection of chip type through the MCU list in the BDT main interface, after selecting the chip, you can judge whether the tool supports the corresponding chip through the title bar of the BQB Tool interface.
(2) Firmware Saving and Downloading
Step1 - Select mode and protocol: Select mode and Protocol through "Test Select" area on firmware download interface.
Step2 - Configure Firmware: In "Configure" area on the firmware download interface, Acc.Code is used to configure the access code, Baud Rate is used to configure the baud rate, UART TX. (RX.) is used to configure the TX and RX pins of the UART, Calibration Postion is used to configure the storage location of the calibration data (according to the actual situation, SRAM can be used when tesing), Power mode is used to configure the power supply mode inside the chip, IO Voltage is used to configure the IO level mode, TX Power is used to configure the transmission power level for packet sending (default: typically 7dBm), Capacitor is used to configure the internal and external capacitance, DP Through Swire is used to enable/disable the function, enabling PA Setting can open the PA Cfg to configure pins for PA_TX(RX).
Step3 - Select Firmware Type: In the "Operation" area of the firmware download interface, select the type by using the checkbox. The available types include Flash program and SRAM program.
Step 4 - Save/Download Firmware: In the "Operation" area of the firmware download interface, click the "Save As Binary" button to save the firmware, and click the "Download & Run" button to download the firmware.
Sending and Receiving Packet Test
Step1 - Connecting the serial port: In the "Serial Port Setting" area of the test interface, "Serial Port" is an optional serial port (if the list is empty, it can be updated by the "Refresh" button), and "Baud Rate" is the baud rate of communication (115200 is selected by default, which is consistent with the firmware's serial communication rate), click the "Open" button to open the serial port after it is configured.
Step2 - Configuring the test mode: In the "BQB Test" area of the test interface, RF Mode is used to select the RF mode, Frequency is used to configure the test frequency point, Pack Type is used to select the data type of the packet, and Payload is used to configure the data length of the packet.
Step3 - Testing: In the "BQB Test" area of the test interface, the "Initialize" button is used to initialize the state of the DUT, the "TX" button is used to control the DUT to send packets, the "RX" button is used to control the DUT to receive packets, and the "END" button is used to control the DUT to stop receiving or sending packets (Click the "END" button in the receiving state to count the number of received packets).
Jtag Tool
Function Description (Jtag Tool)
The main functions of this tool are as follows:
- Install Jtag hardware related drivers
- Download/Erase firmware through Jtag
- Read/Write parameters through Jtag
- Debug through Jtag
Interface Composition and Instructions (Jtag Tool)
The interface of the Jtag tool consists of two parts, the "Target" area and the "Debug" area, as shown in the figure below. The "Target" area is responsible for connecting devices and installing Jtag device drivers, while the "Debug" area is mainly responsible for reading, writing, erasing and debugging functions.
(1) Jtag Device Driver Installation
Step1 - Connect Jtag devices: The Jtag device is shown below and is connected to the PC via USB.
Step2 - Check device drivers: Open the device manager to view the device, if the driver is installed, it will be recognized as a "libusbK USB Devices" normally, as shown below.
If the driver is not installed properly, it will be as shown in the figure below.
Step3 - Install driver: In the "Target" area of the Jtag tool interface, click "Install Jtag Driver" below to install the driver.
(2) Connecting Debug Equipment
Step1 - Connecting debug equipment: Connect the debug device to the Jtag device through the Jtag interface. In the normal connection state, only the blue light of the Jtag device is always on. If the red light is always on at the same time, first check whether the Jtag driver is installed. If the driver installation is normal, then check whether the connection between the Jtag box and the test board is normal.
Step2 - Connecting target devices: After the debugging device is successfully connected, click the "Connect Target" button in the "Target" area of the Jtag tool interface to connect the debugging device. If the title bar of the Jtag tool interface displays "Jtag Tool – target connected", it means that the connection is successful, and the controls in the "Debug" area become operable. If the connection is unsuccessful, it can be solved by plugging and unplugging the USB interface.
(3) Download Function
Step1 - Select firmware: On the main interface of the BDT tool, click "File->Open" to select the firmware to be downloaded.
Step2 - Set the starting address: In the "Debug" area of the Jtag tool main interface, enter the starting address of the download in the input box corresponding to "Addr".
Step3 - Set the object loaded by the firmware: In the "Debug" area of the Jtag tool main interface, the object can be selected by clicking on the check box controls "FLASH" and "SRAM".
Step4 - Perform downloading: In the "Debug" area of the Jtag tool main interface, click the "Download" button to perform the download operation.
Note:
Programs downloaded into Flash are run by clicking the "Restart" button, while programs downloaded into SRAM are run by clicking the "Run" button.
(4) Erase Function
Step1 - Set the starting address: In the "Debug" area of the Jtag tool main interface, enter the starting address of the download in the input box corresponding to "Addr".
Step2 - Set the erase length: In the "Debug" area of the Jtag tool main interface, enter the length to be erased in the input box corresponding to "Len" below the "Erase Flash" button.
Step3 - Perform erase: In the "Debug" area of the Jtag tool main interface, click the "Erase Flash" button to perform the erase operation.
(5) Read/Write Functions
The tool supports reading and writing in three modes: Memory, Flash and Analog. Among them, the Memory mode can support reading and writing in byte, half-word (2 byte) and word (4 byte), while the other modes only support reading and writing by byte.
Step1 - Set the read/write mode: In the "Debug" area of the Jtag tool main interface, click the drop-down box behind the "Write" button to select the mode.
Step2 - Set the read/write width: In the "Debug" area of the Jtag tool main interface, click the drop-down box below the read/write mode selection box to select the read/write width.
Step3 - Set the read/write address and length: In the "Debug" area of the Jtag tool main interface, enter the address in the input box corresponding to "Addr" below the "Write" button, and enter the length in the input box corresponding to "Len". If you are writing data, you also need to enter the data to be written in the input box corresponding to "Data".
Step4 - Perform read/write operations: In the "Debug" area of the Jtag tool main interface, click the "Read" button to perform the read operation, and click the "Write" button to perform the write operation.
(6) Debug Function
The debugging functions supported by the tool include: reading status registers, reading variable values, and common debugging operations.
Step1 - Reading the status register: In the "Debug" area of the Jtag tool main interface, enter the name of the status register in the input box corresponding to "Reg", then press the "Enter" key to find the corresponding register, and then click the drop-down box to select the corresponding register to view the value of this register. If you don't know the name of the register, you can also list all viewable registers by entering "*".
Step2 - Reading variable values: In the "Debug" area of the Jtag tool main interface, enter the name of the variable in the input box corresponding to "Var", then press the "Enter" key to find the corresponding variable, and then click the drop-down box to select the corresponding variable to view the value of this variable. If you don't know the variable name, you can also list all viewable variables by entering "". Note:* To implement this function, ensure that a list file with the same name exists in the bin file directory.
Step3 - Common debugging operations: In the "Debug" area of the Jtag tool main interface, click the "Stall" button to stop the device, Click the "Restart" button to make the device reload the firmware and run from the flash, click the "Pause" button to pause the device program, click the "Run" button to make the device continue to run from the program pause, click the "Step" button to make the device program run in one step, and click the "PC" button to view the device's current PC pointer. In addition, if there is a list file with the same name in the bin file directory, you can also view the corresponding assembly code, but before using this function, enter "*" in the input box corresponding to "Var" and press the "Enter" key.
TWS Tool
Download Tool
(1) Function Description (Download Tool)
"Download Tool" is mainly used to burn bin files, parameter information, etc. to the specified address of Flash. This tool supports burning single and multiple objects at once, and supports burning up to 4 bin files, 1 set of "BT Name" parameters and 1 set of "BT MAC" parameters at a time.
(2) Interface Introduction
The interface of "Download Tool" is shown in the figure below, which mainly includes two areas: "Setting" and "Operation". The "Setting" area is responsible for setting the download information, and the "Operation" part is responsible for executing the download operation.
(3) Instructions for Use
Step1 - Set burning information: In the "Setting" area of the Download tool main interface, select the information to be burned through the radio button on the far left, enter the Flash address written in each information in the input box corresponding to "Address", and enter the corresponding information in the input box corresponding to "Path/Content". Both "BT Name/MAC" have a self-increasing function (The value corresponding to each set of data will increase automatically after burning), which can be selected via the check box on the right. Also note that the maximum length of the "BT Name" can not exceed 25 characters.
Step2 - Execute burning operation: In the "Operation" area of the Download tool main interface, click the "Download" button to perform the download operation.
EQ Tool
(1) Function Description (EQ Tool)
The main functions of this tool are as follows:
- Generate EQ parameter
- Perform online EQ parameter tuning (requires support from relevant protocol)
(2) Interface Composition
The interface of the EQ tool consists of 5 areas, including the graph display area, the "Configure" area, the "Parameter" area, the log output area and the "Operation" area, as shown in the figure below.
(3) Instructions for Use
Step1 - EQ parameter adjustment: First select the mode of parameter tuning, and select it through the Mode in the "configure" area, the tool provides three optional modes by default, namely: "Music" mode (i.e. Line Out), "Speech MIC" mode (i.e. Line In) and "Speech SPK" mode (i.e. Line In to Line Out). Then select the channel, and select it through the Channel in the "configure" area. Next, select the sample frequency and the level of EQ parameter tuning, respectively, through the FreqSmp and Stages in the "configure" area. Finally, all levels of parameters, including filter type, Q value, center frequency and gain value, are configured by Type, Q, Fc and dB in the "parameter" area.
Step2 - View and save EQ parameter values: The parameter value can be obtained by clicking the "Get Parameter" button in the "Operation" area, and the generated parameter value can be saved as a bin file by clicking the "Save as bin file" button.
Step3 - Save EQ configuration: The EQ configuration can be saved and restored through the checkbox corresponding to Setting in the "Operation" area. For the save operation, first select "Save" in the checkbox, then enter the configuration name in the pop-up window, and finally click OK. For restoring a saved configuration, select the name of the saved configuration via the checkbox to restore the configuration.
Step4 - EQ online tuning: First select the method of online parameter tuning, and select the online parameter tuning method through the check box controls ("USB" and "RF") in the "operation" area. Then download the EQ parameters to the device by clicking the "Download" button in the "Operation" area.
Note:
All online parameter tuning methods supported by EQ tool need to be supported by relevant protocols, consult relevant FAE for details.
RISC-V Tool
The RISC-V tool supports the chip to realize the following functions through USB:
- Read/write register
- Read/write/erase flash
- Report debugging information
- VCD function
Note:
The SDK must have a corresponding interaction protocol before this tool can be used.
Read Memory
Read data from a specific storage space (RAM/Analog/Flash), the steps are as follows.
Step1 - Select the storage space type: In the "Memory" area of the interface, click on the drop-down menu to select the type.
Step2 - Set the access area: Enter the starting address of the space to be accessed in the "Addr" input box, and enter the number of required access addresses in the "Size" input box.
Step3 - Read data: Hold the cursor in the "Addr" box, and the user can read data from the specified storage space by pressing the "Tab" key.
Note:
The data in the "Size" input box is hexadecimal. Writing "10" represents reading 16 bytes of data. A maximum of 256 bytes of data can be read at a time.
Write Memory
Write data in a specific storage space (RAM/Analog/Flash), the steps are as follows.
Step1 - Select the storage space type: In the "Memory" area of the interface, click on the drop-down menu to select the type.
Step2 - Set the access area: Enter the starting address of the space to be accessed in the "Addr" input box, and input the length of the data to be written in the "Size" input box.
Step3 - Write data: Enter the target data to be written in the "Data" box. and the user can write the specified data to the specified storage space by pressing the "Enter" key.
Note:
Write data can only write up to four bytes of data.
Download Firmware
Download the firmware to flash, the steps are as follows.
Step1 - Select firmware: Click "File->Import bin" and select the firmware to download.
Step2 - Erase flash: Click the "TS" button, and then click the "Chip_Erase" button to erase all flash data.
Step3 - Download firmware: Click the "Bin_DL" button to download the firmware.
VCD Function
VCD function operation steps are as follows.
Step1 - Select the header file: Click the "Def" button in the VCD function area and select the corresponding header file.
Step2 - Start the VCD function: Click the "VCD" button to start.
Step3 - View the running status of related tasks: Click the "View" button to view the task running status.
Note:
Please consult the SDK responsible person for the definition and use of the header file.
Command Line Description
To facilitate debugging, you can enter the corresponding command to execute the corresponding operation.
(1) Read Command
Command format: [28] [Type] [Address] [Size]
Type: access space type, "00" represents access to digital register; "01" represents access to analog register; "02" represents access to flash.
Address: the address of the access space, accounting for 4 bytes.
Size: the number of access addresses, accounting for 4 bytes.
Example: Read a byte of data from the address of digital register 0x140280.
Command: 28 00 00140280 000001
(2) Write Command
Command format: [2a] [Type] [Address] [Data1] [Data2]……[DataN]
Type: access space type, "00" represents access to digital register; "01" represents access to analog register; "02" represents access to flash.
Address: the address of the access space, accounting for 4 bytes.
DataN:data to be written.
Example: the flash 0x1000 address writes data "0x1122334455".
Command: 2a 02 00001000 55 44 33 22 11
(3) Flash Erase Command
Command format: [2a] [03] [Address] [Size]
Address: the address of the access space, accounting for 4 bytes.
Size:the size of the flash space erased, accounting for 4 bytes.
Example: flash 0x1000 address erase 4k data.
Command: 2a 03 00001000 00001000
Example: erase the whole flash.
Command: 2a 03 00000000 00000000
(4) Save the Read Data
Command format: [r] [String] [28] [Type] [Address] [Size] [BinPath]
r: read command.
String: string, which can be customized.
Type: access space type, "00" represents access to digital register; "01" represents access to analog register; "02" represents access to flash.
Address: the address of the access space, accounting for 4 bytes.
Size: the size of the data to be read, accounting for 4 bytes.
BinPath: the path where the read data is to be saved.
Example: read 4k data from flash 0 address and save it to D drive.
Command: r read 0228 00000000 00001000 -d:\read.bin
Clear and Save Logs
Clear log: click the "Clear" button on the interface to clear the log.
Save log: click the "Save" button on the interface, select the file saving path and enter the file name.
EMI Tool
Functional description (EMI Tool)
The tool has two main functions:
-
Configure and download the test firmware.
-
EMI test.
-
Non-signaling test.
-
RF current test.
Interface Composition and Instructions (EMI Tool)
The tool is mainly composed of four parts: firmware configuration download interface, EMI test interface, non-signaling test interface and RF current test interface, as shown in the figure below.
(1) Chip Selection
Chip model selection is performed through the MCU list on the BDT main interface.
(2) Save and Download Firmware
Step1 - Select mode and protocol: In the "Test Select" area on the firmware download interface, select the test mode.
Step2 - Firmware configuration: In the "Configure" area of the firmware download interface, "Power Mode" is used to configure the power supply mode inside the chip, "IO Voltage" is used to configure the IO level mode, 'Capacitor' is used to configure the internal and external capacitance, "Calibration Position" is used to configure the storage position of the calibration data (according to the actual situation), "Access Code" is used to configure the access code, if you use the "DP Through Swire" function, check the corresponding option.
Step3 - PA Configuration: In the "PA Setting" area of the firmware download interface, check "Enable" to use the PA function. In addition to the above operations, users also need to input the path of the binary file for PA operation into the corresponding text box, the binary file related to PA operation can be generated through the "PA Configure Tool", you can click on "PA.Cfg.Tool" to open the tool, the use of the tool can refer to corresponding chapters.
Step4 - Select firmware type: In the "Operation" area of the firmware downloading interface, select the type by using the radio box. The available types include Flash program and SRAM program.
Step5 - Save/Download firmware: In the "Operation" area of the firmware download interface, click the "Save As Binary" button to save the firmware, and click the "Download & Run" button to download the firmware.
(3) EMI Test
Step1 - Configure frequency, power, and RF mode: In the "Setting" area of the EMI test interface, input the test frequency, select the TX power (required for TX testing) and select the RF mode.
Step2 - TX test: The TX test includes two types of RF signals, namely single carrier signal and continuous modulated signal. They can be configured separately using the "Carrier" and "CarrierData" buttons in the "TX Continue" area, and set the packet type by "Packet Type". Additionally, the continuous modulated signal supports frequency hopping mode, which can be set by ticking the "Hop" box.
Step3 - RX test: The "RX Test" button in the "RX" area controls the DUT into RX test mode.
(4) Non-signaling Test
Step1 - Configure frequency, power, and RF mode: In the "Setting" area of the non-signaling test interface, input the test frequency, select the TX power (required for TX testing) and select the RF mode.
Step2 - TX test: In the "TX Burst" area of the non-signaling test interface, select the number of consecutive packets to be sent by using "Packet. Count" (only two modes of sending 1000 packets per time or an unlimited number of packets are supported). Set the packet length by "Payload Len.", select the packet type by "Packet Type", set the duty cycle by "Duty Cycle", and set the TX burst adaptive test by "Adaptive".
Step3 - RX test: The "RX Test" button in the "RX" area controls the DUT into RX test mode, clicking on the "RX Count" button to view the current number of received packets, and clicking on the "RSSI" button to view the power of the RF signal source.
(5) RF Current Test
Step1 - Download the firmware required for RF current test: In the "Current Test Firmware" area of the RF current test interface, configure the internal power supply of the MCU and click on the "Download" button to download the firmware for the current test (the DUT needs to be powered down and on at the beginning of each time).
Step2 - TX current test: In the "Current Test Operation" area of the RF current test interface, configure the power supply method, power and frequency point, and enter the TX current test by clicking on the "TX Current" button.
Step3 - RX current test: In the "Current Test Operation" area of the RF current test interface, configure the frequency point and enter the RX current test by clicking on the "RX Current" button.
PA Configure Tool
Function Description (PA Configure Tool)
This tool is mainly used to configure the binary files required to generate the PA.
Interface Composition and Instructions (PA Configure Tool)
The interface of the tool is shown below.
(1) Configure the File that Generates the PA
Step1 - Add PA-controlled pin: Add the pin required for the PA to work by clicking on the "Add" button.
Step2 - Configure the level of each pin in the different operating modes: Configure the level of each pin in "Init", "TX", "RX" and "Bypass" modes respectively.
Step3 - Generate binary files: The configuration can be saved as a binary file by clicking on the "Save As Binary" button.
EVK Offline Tool
Function Description (EVK Offline Tool)
This tool is used in conjunction with BurningEVK with offline download function, The main features include:
-
Update the tool firmware in the BurningEVK.
-
Download the user program into BurningEVK.
Interface Composition and Instructions (EVK Offline Tool)
The interface of the tool includes the tool firmware interface and the user tool interface, as shown below.
(1) Update Tool Firmware
Step1 - View the tool firmware in the BDT: Click on the "List all" button to view the existing tool firmware.
Step2 - Update firmware: Update the tool firmware to the BurningEVK by clicking on the "Update" button.
Note:
The tool firmware interface is hidden by default and needs to be displayed by modifying the configuration file.
(2) Download User Firmware
Step1 - Add user firmware: Add the user firmware by clicking on the "Add" button and configure the "Chip Name", "Bin Name", "Destination", "Addr" and "File Path" information.
Step2 - Download user firmware: First tick the firmware that needs to be downloaded to BurningEVK and then click on the "Download" button to complete the download.
Secure Boot Tool
The main functions of this tool are as follows:
-
Supports the download of chip configuration information and firmware.
-
Supports re-enabling the Debug interface function.
-
Supports reading the configuration information of the chip.
Interface and Instructions
The Secure Boot tool interface is shown in the following figure.
(1) Mode Selection
Select either "secure boot mode" or "normal mode".
(2) Firmware Encryption
Select to enable or disable the "Firmware Encryption" function.
(3) Secure Debug
Select to enable or disable the "Secure Debug" function.
(4) Run Description Address
Select the flash size and the corresponding code description address will be confirmed automatically.
Note:
This function is only available in "secure boot mode".
(5) Pubkey Hash
Select the "public_key_hash.bin" file to be burned. After clicking the "Download-All" button, the program will automatically check whether the length of the file size meets the conditions. If it doesn't, the program will report an error.
Note:
This function is only available in "secure boot mode".
(6) Root Key
Enter a string of 16 characters or 32 hexadecimal characters as the root key in the input box. It also supports selecting a text file to import the key.
Enter a string of 32 hexadecimal characters, for example: 00112233445566778899aabbccddeeff or 00112233445566778899AABBCCDDEEFF.
Enter a string of 16 characters, for example: tlk_key-1234abcd.
After clicking the "Download-All" button, the program will automatically check whether the input string meets the conditions. If the conditions are not met, an error will be reported.
Note:
The "Root Key" needs to be set only when the "Firmware Encryption" or "Secure Debug" function is enabled.
(7) Debug Plaintext
Enter a string of 16 characters or 32 hexadecimal characters as the root key in the input box. It also supports selecting a text file to import the key.
Enter a string of 32 hexadecimal characters, for example: 00112233445566778899aabbccddeeff or 00112233445566778899AABBCCDDEEFF.
Enter a string of 16 characters, for example: tlk_key-1234abcd.
After clicking the "Download-All" button, the program will automatically check whether the input string meets the conditions. If the conditions are not met, an error will be reported.
Note:
The "Debug Plaintext" needs to be set only when the "Secure Debug" function is enabled.
(8) Run Code
Tick the check box, select run code 0 or code 1 and run code address, and import the firmware path.
(9) Run Code description
Tick the check box, select the run code description file path and import it.
Note:
This function is only available in "secure boot mode".
(10) Download-All
The configuration information of the chip in the "Setting" area is downloaded to eFuse. The files selected in the "Run Code" and "Run Code description" areas are downloaded to flash.
Note:
When the "Secure Debug" function is enabled, click the "Download-All" button, regardless the download is successful or not, the "Debug Key" file will be generated in the path of tool config\sboot\key.
(11) Download-Flash
The files selected in the "Run Code" and "Run Code description" areas are downloaded to flash.
Note:
If eFuse has been burned, just update the firmware program and click the "Download-Flash" button.
(12) Re-enable Debug-interface
When the "Secure Debug" function is enabled, the "Debug" function of the chip will be disabled. Click the "Re-enable Debug-interface" button wil pop up a dialog box. Select "Yes" and use the DebugKey.txt file in the default folder as the "Debug Key" to restore the "Debug" function. Select "No", manually import the file as the "Debug Key" to restore the "Debug" function.
(13) Read-Info
Read the configuration information in the chip eFuse, excluding the information in the "Root Key" and "Debug Plaintext".
(14) Save
Save the configuration information in the interface, and save the information in "Root Key" and "Debug Plaintext" to the config\sboot\key path.
Commonly Used Secure Mechanism Options and Usage Instructions of the Tool
The Secure Boot, Firmware Encryption, and Secure Debug security mechanisms can be used individually and can be freely combined. However, in practice it is recommended to use the following combinations:
-
Option 0: Secure Boot + Secure Debug
-
Option 1: Firmware Encryption + Secure Debug
-
Option 2: Secure Boot + Firmware Encryption + Secure Debug
(1) Secure Boot + Secure Debug
Step1: Select "secure boot mode" in the "Mode Selection" drop-down box.
Step2: Select "Disable" in the "Firmware Encryption" drop-down box.
Step3: Select "Enable" in the "Secure Debug" drop-down box.
Step4: Select the corresponding flash size according to the chip package. The default selection here is "Flash: 1M".
Step5: In the "Run Code" area, select run code 0 or code 1 and the run code address, and import the firmware path.
Step6: After the previous step is completed, the "public_key_hash.bin" file path is automatically imported into the "Pubkey Hash" input box, and if it is not successful, it should be imported manually.
Step7: Import the run code description file path in the "Run Code description" area.
Step8: Enter the key in the "Root Key" and "Debug Plaintext" input boxes.
Step9: Click the "Download-ALL" button to complete the download.
(2) Firmware Encryption + Secure Debug
Step1: Select "normal mode" in the "Mode Selection" drop-down box.
Step2: Select "Enable" in the "Firmware Encryption" drop-down box.
Step3: Select "Enable" in the "Secure Debug" drop-down box.
Step4: Select the firmware download address and import the firmware path.
Step5: Enter the key in the "Root Key" and "Debug Plaintext" input boxes.
Step6: Click the "Download-ALL" button to complete the download.
(3) Secure Boot + Firmware Encryption + Secure Debug
Step1: Select "secure boot mode" in the "Mode Selection" drop-down box.
Step2: Select "Enable" in the "Firmware Encryption" drop-down box.
Step3: Select "Enable" in the "Secure Debug" drop-down box.
Step4: Select the corresponding flash size according to the chip package. The default selection here is "Flash: 1M".
Step5: In the "Run Code" area, select run code 0 or code 1 and the run code address, and import the firmware path.
Step6: After the previous step is completed, the "public_key_hash.bin" file path is automatically imported into the "Pubkey Hash" input box, and if it is not successful, it should be imported manually.
Step7: Import the run code description file path in the "Run Code description" area.
Step8: Enter the key in the "Root Key" and "Debug Plaintext" input boxes.
Step9: Click the "Download-ALL" button to complete the download.
Audio Tool
EQ Tool
(1) Function description(EQ Tool)
The main functions of the tool are as follows:
- Generate EQ Parameters
- Online EQ tuning (requires protocol support)
(2) Interface Area
The interface of the EQ tool consists of five areas, including the chart display area, the filter parameter area, the "Configuration" area, the "Online Operation" area and the log output area as shown in the figure below.
(3) Instructions
Step1 - EQ Tuning: First, select the mode of the tuning, through the Mode under the "Configuration" area, the tool provides three modes by default, namely: "Music" mode (i.e. Line Out), "MIC" mode (i.e. Line In), 'SPK' mode (i.e. Line In to Line Out), "SPK" mode (i.e. Line In to Line Out). Next, select EQ Group (supports up to 8 groups). Then select the EQ type. Finally, configure the parameters of each level, click "Add" button to add first-order filter, click "Remove" button to delete first-order filter, configure filter type, Q value, center frequency and gain value respectively respectively through Type, Q, FC and dB in the filter parameter area. By clicking "Reset All Stage" button, you can reset the parameters of all the filters. While adjusting the parameters, the EQ curve will be changed accordingly. The "Preattenuate" drag bar on the right side of the graph represents the pre-attenuation value, which can be dragged to adjust the overall EQ gain.
Step2 - View and save EQ parameter values: View the parameter values by clicking on the "View Para" button in the 'Configuration' area, and save the generated parameter values to a txt file by clicking on the "Save Para" button.
Step3 - Save and Import EQ Configurations: The "Save Setting" button in the "Configuration" area allows you to save the current EQ parameter configuration as a bin file. By clicking the "Load Setting" button, you can restore the saved EQ configuration bin file to the tool interface.
Step4 - EQ Online Tuning: First, select the way of online tuning, through the "Port" in the "Online Operation" area, currently support "USB_hid", "usb_print", "Uart". If you choose usb mode, select the corresponding usb handle in the drop-down box below; if you choose Uart mode, select the corresponding COM in Uart Tool and click "Open". Then click "Download" button to download the EQ parameters to the device, click "Disable/Enable" button to turn off/on the EQ, click "Sync" button to set the EQ parameters to the device.
Notes:
- The online tuning methods supported by the EQ tool need to be supported by the relevant protocols, which should be consulted with the relevant FAEs.
DRC Tool
(1) Function description (DRC Tool)
The main functions of the tool are as follows:
- Generate DRC Parameters
- Online DRC tuning (requires protocol support)
(2) Interface Area
The interface of the DRC tool consists of five areas, including the chart display area, the parameter configuration interface, the "Operation" area, the "Online" area and the log output area, as shown in the figure below.
(3) Instructions
Step1 - DRC tuning: First, select the type of tuning by clicking the "Enable" checkbox under the "Noise Gate", "Expander", 'Compressor' or "Limiter" area, then adjust the "Threshold", "Width", 'Ratio' and "Makeup" parameters by dragging the bar or entering them in the edit box below, and the corresponding DRC curves will be changed accordingly, then modify the "Attack(ms)", "Release(ms)", "Hold(ms)" and "Samples" value through edit boxes.
Step2 - View and save DRC parameter values: View the parameter values by clicking the "View Parameters" button in the 'Operation' area, and you can save the generated parameter values to a txt file by clicking the "Save Parameters" button.
Step3 - Save and import DRC configurations: The current DRC configuration can be saved as a bin file by pressing the "Save Setting" button in the "Operation" area. By clicking the "Load Setting" button, you can restore the saved DRC configuration bin file to the tool interface.
Step4 - DRC online tuning: First , select the tuning way through the "Port" in the 'Online' area, currently support "USB_hid", "usb_print", "Uart". If you choose usb mode, select the corresponding usb handle in the drop-down box below; if you choose Uart mode, select the corresponding COM in Uart Tool and click "Open". Then click "Download Parameter" button to download the DRC parameters to the device.
Notes:
- The online tuning methods supported by the DRC tool need to be supported by the relevant protocols, which should be consulted with the relevant FAEs.
ANC Tool
(1) Function description (ANC Tool)
The main functions of the tool are as follows:
- Generate ANC Parameters
- Online ANC tuning (requires protocol support)
(2) Interface Area
The interface of the ANC tool consists of six areas, including the chart display area, the filter parameters area, the "Configuration" area, the "Online Operation" area, the "Parameters" area, and the log output area, as shown in the following figure.
(3) Instructions
Step1 - ANC Tuning: First, select the mode of the tuning, select "FF", "Hybrid" or 'FB' by ALG under the "Configuration" area. Next, select the sample rate 384k or 768k, then select the channel "chan" and IC "chip", then select the filter group "wz", "cz0", "cz1" or "cz2". The maximum filter order that can be configured for this group can be set in the edit box on the right. Finally, configure parameters of all leves. Click "Add" to add first-order filter, and click "Remove" to delete first-order filter. Configure the filter type, Q type, Q value, center frequency and gain value under Type, Option, Opval, FC and dB in the Filter Parameters area respectively. By clicking the "Reset All Stages" button, the parameters of all filters can be restored While adjusting the parameters, the ANC curve will be changed accordingly. The parameters can be edited in the "Parameters" area.
Step2 - View ANC parameter values: View parameter values by clicking the "View Para" button in the "Configuration" area.
Step3 - Save and Import ANC Configuration: The current ANC parameter configuration can be saved as a bin file by clicking the "Save Setting" button in the HConfiguration" area. You can restore the saved ANC configuration bin file to the tool interface by clicking the "Load Setting" button.
Step4 - ANC Online Tuning: Firstly, select the way of online tuning through the "Port" in the "Online Operation" area, currently support "USB_hid", "usb_print", "Uart". If you choose usb mode, select the corresponding usb handle in the drop-down box below; if you choose Uart mode, elect the corresponding COM in Uart Tool and click "Open". Then click "Parameters" button to download the parameters in the 'Parameters' area to the device, and click "IIR" to deliver the parameters of the current filter group to the device. Click 'FIR' and select the FIR txt file to deliver the FIR configuration to the device, and click "Sync" to synchronize the order of the filter group in the device to the tool interface.
Notes:
- The online tuning methods supported by the DRC tool need to be supported by the relevant protocols, which should be consulted with the relevant FAEs.
EMI Tool for TLSR9118
Function description(TLSR9118 EMI Tool)
The tool has two major functions:
- Configure and download test firmware.
- Perform EMI testing.
- Perform user command testing.
Interface Area and Using Instructions (TLSR9118 EMI Tool)
The tool mainly consists of three parts: firmware configuration download interface, EMI test interface, and send user command test interface, as shown in the following figure.
(1) Chip Selection
Select the TLSR9118 via the BDT main interface MCU list.
(2) Configure and Download Firmware
Step1 - Configure firmware: In the firmware download interface, you can configure the address of firmware download through the edit box under "Address(H)", click the document button under 'open' to select the firmware. After selecting the firmware, it will refresh the path of the firmware under "File Path", and automatically check the "EN" enable box in the current line. If you don't need to download a certain firmware, uncheck the "EN" box.
Step2 - Select the serial port and baud rate: Click the COM drop-down box under "Operation" to select the serial port, and click the Baudrate drop-down box to configure the rate for firmware download.
Step3 - Erase/Download Firmware: After configuration in Step2, click "Erase" to erase the firmware, and click "Download" to download multiple configured firmware.
Step4 - MAC read/write: Click "Read" drop-down box after "BLE MAC" or "WIFI MAC" to toggle read/write MAC commands, and click "Start" button to execute MAC read/write commands.
Notes:
Make sure the serial port driver is successful before the firmware download, or click Install Uart driver X64(X86) to install the driver.
(3) EMI Test
Step1 - Configure the serial port and baud rate: In the "Uart Setting" area of EMI test interface, select the serial port and baud rate, and then click "open" button to open the serial port.
Step2 -Configure RF mode, rate, frequency point, bandwidth, etc.: In EMI test interface, select the RF mode, rate, frequency point, bandwidth, etc. that need to be tested in the corresponding drop-down box.
Step3 - TX Test: The TX test consists of two RF types of signals, single carrier signals and continuous modulated signals, which can be set through the "Carrier" and "CarrierData" buttons in the "TX" area, and the TX test can be stopped by "TX Stop".
Step4 - RX Test: Control the DUT to enter the RX test mode through the "RX Test" button in the 'RX' area, click "RX Count" to check the number of received packets, and "RX Stop" to stop the RX test.
(4) User Command Test
Step1 - Configure the serial port and baud rate: In the "Uart Setting" area of EMI test interface, select the serial port and baud rate, and then click "open" button to open the serial port.
Step2 - Command Input: In the "User Data Area" box, you can input the relevant test commands, the supported commands need to consult the relevant FAE.
Step3 - Command sending: Send test commands by clicking the "Send" button.
Command Line Guide
Download Firmware
Download firmware to "FLASH" via "USB" mode
Before using "USB" mode to download or debug MCU, make sure the specified MCU supports USB function and its USB function is available. Users can input the corresponding commands to download the firmware to the specific flash space of the target board via "USB" mode.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 wf 0 –i C:\Users\Admin\Desktop\bin\Telink.bin -u
Parameters:
- Parameter1: Device ID (see Section Supporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See Section Command List) - "wf" (write to flash)
- Parameter4: Store the starting address for target firmware to be downloaded - "0"
- Parameter5: Optional command - "-i" (follow firmware path)
- Parameter6: Firmware path - "C:\Users\Admin\Desktop\bin\Telink.bin"
- Parameter7: Optional command - "-u" (communication mode with target board: "USB" mode)
After downloading the firmware to the target board, users can enter the corresponding command line and reset the MCU directly without rebooting the target board.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 rst –u –f
Parameters:
- Parameter1: Device ID (see Section Supporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See Section Command List) - "rst" (reset)
- Parameter4: Optional command - "-u" (communication mode with target board: "USB" mode)
- Parameter5: Optional commands - "-f" (Flash, "-c": CORE)
Select "-f" to reset the MCU if download firmware to FLASH.
Select "-c" to reset the MCU if download firmware to SRAM.
Download firmware to "FLASH" via "EVK" mode
Before using "EVK" mode to download the firmware, make sure the target board is connected to the computer via the "Burning EVK" method, and the single line communication of the target board has been established. Users can enter the appropriate commands to download the firmware to a specific flash space on the target board via "Burning EVK" mode.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 wf 0 –i C:\Users\Admin\Desktop\bin\Telink.bin
Parameters:
- Parameter1: Device ID (see Section Supporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See Section Command List) - "wf" (write to flash)
- Parameter4: Store the starting address for target firmware to be downloaded - "0"
- Parameter5: Optional command - "-i" (follow firmware path)
- Parameter6: Firmware path - "C:\Users\Admin\Desktop\bin\Telink.bin"
Since the optional command "-u" is not included in the command line, choose to use the "EVK" communication mode with the target board.
After downloading the firmware to the target board, users can enter the corresponding command line and reset the MCU directly without rebooting the target board.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 rst –f
Parameters:
- Parameter1: Device ID (see Section Supporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See Section Command List) - "rst" (reset)
- Parameter4: Optional commands - "-f" (Flash, "-c": CORE)
Select "-f" to reset the MCU if download firmware to FLASH.
Select "-c" to reset the MCU if download firmware to SRAM.
Download firmware to "SRAM" or "OTP"
Users can download the firmware into "SRAM" / "OTP" instead of Flash. Users can download the firmware to a specific "SRAM" or 'OTP' space on the target board via "USB" mode by entering the corresponding command line. Before using this method to download the firmware, user should know the "SRAM" start address of the specific MCU, e.g. B92_3V3: 0xc0000000.
Example command line to download firmware to SRAM:
./Cmd_download_tool.exe 1 B92_3V3 wc c0000000 –i C:\Users\Admin\Desktop\bin\Telink.bin
Parameters:
- Parameter1: Device ID (see Section Supporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See Section Command List) - "wc" (write to CORE, including digital registers and SRAM)
- Parameter4: Store the starting address for target firmware to be downloaded - "c0000000"
- Parameter5: Optional command - "-i" (follow firmware path)
- Parameter6: Firmware path - "C:\Users\Admin\Desktop\bin\Telink.bin"
Since the optional command "-u" is not included in the command line, choose to use the "EVK" communication mode with the target board.
Example command line to download firmware to OTP (if the target board supports OTP):
./Cmd_download_tool.exe 8368 1 wo 0 –i C:\Users\Admin\Desktop\bin\Telink.bin
Parameters:
- Parameter1: Device ID (see SectionSupporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - 8368
- Parameter3: Operation commands (See SectionCommand List) - "wo" (write to OTP)
- Parameter4: Store the starting address for target firmware to be downloaded - "0"
- Parameter5: Optional command - "-i" (follow firmware path)
- Parameter6: Firmware path - "C:\Users\Admin\Desktop\bin\Telink.bin"
Since the optional command "-u" is not included in the command line, choose to use the "EVK" communication mode with the target board.
Reset MCU
After downloading the firmware to the target board, the user can reset the MCU to allow the newly downloaded program to run without rebooting the target board.
Command Line Example to reset MCU:
./Cmd_download_tool.exe 1 B92_3V3 rst -f
Parameters:
- Parameter1: Device ID (see SectionSupporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See SectionCommand List) - "rst"
- Parameter4: Optional commands - "-f"
After downloading the firmware to the target board's flash or OTP, the user should reset the MCU using the optional command "-f".
After downloading the firmware to the SRAM of the target board, the user should reset the MCU using the optional command "-c".
Since the optional command "-u" is not included in the command line, choose to use the "EVK" communication mode with the target board.
Erase Flash Sector
The "Erase Flash Sector" function is used to erase a specific flash space in sectors (4kB) starting from a specific address.
For example, to erase the 64kB of flash space of B92_3V3 starting at address 0x004000, the user could enter the following command line
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 wf 4000 –s 64k –e
Parameters:
- Parameter1: Device ID (see SectionSupporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See SectionCommand List) - "wf" (write to flash)
- Parameter4: Starting address of the space to be erased - "4000"
- Parameter5: Optional command - "-s" (follow the size of the sector to be deleted)
- Parameter6: Sector size to be deleted - "64k"
- Parameter7: Optional command - "-e" (erase flash)
Since the optional command "-u" is not included in the command line, choose to use the "EVK" communication mode with the target board.
Flash protection
Data protection is needed for specific address areas of Flash. Data protection of the Flash prevents accidental erasure or programming of the Flash.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 lf 0 512
Parameters:
- Parameter1: Device ID (see SectionSupporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands - "If"
- Parameter4: Start Address of flash Protected Area
- Parameter5: Size of protected area (in KB)
Flash deprotection
Flash is protected and needs to be deprotected before it can be erased or programmed.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 lf 0 0
Parameters:
- Parameter1: Device ID (see SectionSupporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands - "If"
- Parameter4: Fixed to 0
- Parameter5: Fixed to 0
Activate MCU
The "Activate MCU when communication with target board fails" function is only available for Swire connection between target boards in "Burning EVK" and "EVK" modes, i.e. it does not support 'USB' mode or USB connection between target boards in "Burning EVK" and "EVK" modes.
When firmware burning fails, make sure the target board is connected to "Burning EVK" via Swire. User can enable this function by entering the appropriate command line to activate the MCU.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 ac
Parameters:
- Parameter1: Device ID (see SectionSupporting Multiple Devices for details) - 1 (only one device)
- Parameter2: MCU Type - B92_3V3
- Parameter3: Operation commands (See SectionCommand List) - "ac" (Activate MCU)
Debug
Once the MCU is up and running, the user can access the memory space (FLASH/CORE/ANALOG/OTP) using this tool
Read data
To read data from a specific memory space (FLASH/CORE/ANALOG/OTP), the user can enter the appropriate command line.
Command Line Example:
- Read flash: ./Cmd_download_tool.exe 1 B92_3V3 rf 0 -s 16
- Read core(digital register/SRAM): ./Cmd_download_tool.exe 1 B92_3V3 rc 0 –s 16
- Read analog register : ./Cmd_download_tool.exe 1 B92_3V3 ra 0 –s 16
- Read OTP: ./Cmd_download_tool.exe 1 B92_3V3 ro 0 –s 16
Note that the maximum read size is 1MB, see SectionCommand List.
When reading memory space larger than 1024 bytes, the data will be saved to a file with the default name "/user/read.bin". The following command line can be used to customize the file name.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 rc 40000 –s 8k –o C:\Users\Admin\Desktop\bin\Telink_read.bin
Write data
The user can enter the appropriate command line to write data to a specific memory space.
Command Line Example:
- Write to flash: ./Cmd_download_tool.exe 1 B92_3V3 wf 0 11 22 33 44 –s 4
- Write to core(digital register/SRAM): ./Cmd_download_tool.exe 1 B92_3V3 wc 40000 11 22 33 44 –s 4
- Write to analog register : ./Cmd_download_tool.exe 1 B92_3V3 wa 34 11 22 33 44 –s 4
- Write to OTP: ./Cmd_download_tool.exe 1 8368 wo 0 11 22 33 44 –s 4
Note that the maximum operation size is 256 bytes, see SectionCommand List.
Trace PC
The user can enter the appropriate command line to read "PC".
Command line example: ./Cmd_download_tool.exe 1 B92_3V3 pc
For more detailed information, it is needed to provide the ".lst" file that matches the firmware.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 pc –i C:\Users\Admin\Desktop\bin\Telink.lst
Single-wire synchronous
1) Power supply is normal; 2) The MCU is not in "low power" mode; 3) The MCU's single wire function is available; 4) System clock is normal.
When a connection cannot be established with the target board, the user can try to set the Swire (single wire) synchronization speed to improve communication by entering the appropriate command line.
Notes:
- Swire register address may vary depending on chip type
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 sws b0 10 b0 10
- Swire command: sws
- Master device base address: 0xb0
- Master device speed: 0x10
- Slave device base address: 0xb0
- Slave device speed: 0x10
Before downloading the firmware to the target board or debugging the MCU, it is recommended that the user performs a Swire synchronization each time the MCU is powered on to check for proper communication with the target board.
If the communication status with the target board is incorrect, the user can solve the problem by following the previously mentioned methods.
Windows logs
This tool supports USB print function, so MCU with USB function can use USB print function to output information in windows log on PC side.
Command Line Example:
./Cmd_download_tool.exe 1 B92_3V3 log usb 1 –u
Press "Esc" to exit the windows log.
List of commands
By typing the following command line, a list will appear showing all supported command lines.
Command line showing a list of commands:
./Cmd_download_tool.exe help
Supports multiple devices
By entering the following command line, the device list will display all available USB devices. Users can select the device ID and access the specified device according to their needs.
Command line showing a list of commands:
./Cmd_download_tool.exe all
Users can access different devices by device ID as shown below.