BQ796xx Command Sequence Help
Overview
This tool allows one or more arbitrary Command Frame packets to be created and sent to the stack. Data for one frame can be typed into “Command Frame to send”. This frame is sent to stack over UART using “Send Command Frame to Stack”. This command frame and any response frames returned from stack are displayed in the transaction log.
Create one command frame and send to Stack
Send one command frame by entering each hexadecimal character separated by a space into “Command Frame to Send” without the 2 byte CRC. The CRC for the frame will be calculated and appended to frame when sent. A command frame helper is provided to assist with frame header creation. “Generate Command Frame Header” button will copy the created header into the “Command Frame to Send” box. Any additional bytes or changes needed to complete frame must be typed.
Send this frame to stack with Send Command Frame button. The tool will assemble the frame, calculate and append the CRC, and send to stack over the UART. The command frame is copied into the Commands Dialog. Command frames are displayed in blue text.
The Transaction Log displays each command frame sent and any response frames returned. Both frames are parsed with CRC and relevant fields.
This is an example BQ796xx command. CRC will be calculated and appended to command before it is sent by the tool. This command is a Single Device Read of two bytes starting at register 0 from device 1.
80 01 00 00 01
Malformed frame commands may result in a communication Timeout Error. Timeout errors can be cleared with the ResetComm button to the right of the Command Dialog.
Command Dialog Operations
A command dialog tool bar is located on the right of this dialog with functions associated with this dialog. All commands present in the command dialog can be send to stack in sequential order by clicking “Run”. Each command present in the command dialog will be sent beginning with the first command. The command frame and any response will appear in the transaction log. This allows a script of command frame operations to be applied to the stack.
Content of transaction log and command dialog can be cleared or saved to a file using appropriate buttons.
A horizontal scroll bar is present in this dialog if more commands are present than can be displayed.
Load and Execute a Script
A series of command frames in a text file can be loaded into the command dialog. After loading, the frames are executed using the “Run” button.
A script file has the following syntax.
  1. Each command must be on a separate line without CRC.
  2. Each command byte is hexadecimal separated by one or more whitespaces.
  3. The commands are not case sensitive.
  4. A line that contains a “#” in the first character position of any line is a comment on ignored.
  5. A delay in milliseconds in decimal can be entered with a line in the form of Delay 20. This will delay command execution the specified number of msec. This delay is not exact. It will be at minimum the delay specified.
  6. The file suffix is .txt
Use the “Load” button to load a script of command frames. The content of the script without comments is displayed in the command dialog.
Use “Run” to execute the frames.
Example script
80 00 00 00 1F
80 01 00 00 1F
These two command frames will read the first 32 byte from device 0 and device 1 if present in command dialog and “Run”.
Attach command frame sequence file to button
A command frame sequence file may be assigned to a button. Once the script is assigned, a left click on the button will load the script into the command dialog. The frames are then executed with “Run” button.
Any unassigned command button will open a dialog that allows a unique button name of up to 15 characters to be entered for the name. Use select to open a file browser and select the file to be assigned. This data is saved on the system and read on startup.
Right click on any assigned button and use “Clear” to remove the button content so it can be reassigned.
CLOSE