SLAU358Q September 2011 – October 2019
The Get Progress Status command is a low-level command and can be used at any time, even if the MSP-GANG is busy with other tasks. It replies to the command without interrupting the currently serviced process. Some commands that have the long execution time requires use the Get Progress Status command for monitoring the current state. For example, the Main Process command that can be executed a few seconds or more, responding with character "In Progress 0xB0" as fast as the command has been received and accepted. The communication link has been released and ready to use the Get Progress Status command. Now the current status and progress data can be monitored by polling the Get Progress Status command. Contents of the progress status contains current task number, chunk number, and information about what tasks have been already finished (erase, blank check, program, verify and more). Additionally, the comment displayed on the LCD display is also available in the progress status message. This makes it possible to mirror the progress status on a PC screen and for the status on the PC screen to appear the same as it is in the MSP-GANG LCD display. The internal firmware the progress status buffer is always updated when the new task or new chunk is executed. In cases where the LCD is updated frequently, it might not be possible for the PC screen to exactly mirror it. If polling is done more frequently, then all messages on the PC can be updated almost in real time. Polling can be fast, but it is not recommended to send the Get Progress Status command within the 20-ms interval. The MSP-GANG has an internal 8-level FIFO buffer for progress status (8 internal buffers of 50 bytes each). This allows messages to be retrieved even if status has been changed a few times in the interval of 20 ms, as long as the next task is bigger and the status is not updated within the next 100 ms.
One of the bytes (byte 6) in the progress status contains information as to whether the process is still in progress or if it is finished. If the process is finished, then the programmer is ready to get the next command. If the process is in progress, then only the Get Progress Status command can be used. Do not send any other commands. The next command can also be accepted, but the new command bytes would be collected in the RX buffer until the MSP-GANG is ready to service it. When the first valid byte of the new command has been received (byte prompt '>' 0x3E ), then the receiver cannot get the Get Progress Status command, because the 0xA5 byte, instead of the Get Progress Status command, is treated as a data byte in the data frame.
When the Get Progress Status command is detected (single 0xA5 byte if it is not the frame data contents) then the current status (50 bytes) is transmitted from the MSP-GANG with following data:
byte | 0 | 0x80 | |
byte | 1 | 0xA5 | |
bytes | 2-3 | (WORD) | Task counter |
bytes | 4-5 | (WORD) | Chunk counter |
byte | 6 | Status – In Progress, ACK or NACK | |
byte | 7 | Ack or nack | |
bytes | 8-9 | (WORD) | Finished tasks mask |
byte | 10 | Cumulative gang mask | |
byte | 11 | Request gang mask | |
byte | 12 | Connected gang mask | |
byte | 13 | Erased gang mask | |
byte | 14 | Blank check gang mask | |
byte | 15 | Programmed gang mask | |
byte | 16 | Verified gang mask | |
byte | 17 | Secured gang mask | |
bytes | 18-23 | Spare | |
byte | 24 | Error number | |
byte | 25 | Internal VTIO (VTIO = data × 32 mV) | |
byte | 26 | VCC gang status mask – A | |
byte | 27 | VCC gang status mask – B | |
byte | 28 | VCC error mask | |
byte | 29 | VCC cumulative error mask | |
byte | 30 | JTAG init err mask | |
byte | 31 | JTAG Fuse already blown mask | |
byte | 32 | Wrong MCU ID mask | |
byte | 33 | Progress bar (0 – 100%) | |
bytes | 34-50 | Comment text (comment currently displayed on the LCD display) |
Where, bytes 8-9 are task mask bits:
CONNECT_TASK_BIT | 0x0001 |
ERASE_TASK_BIT | 0x0002 |
BLANKCHECK_TASK_BIT | 0x0004 |
PROGRAM_TASK_BIT | 0x0008 |
VERIFY_TASK_BIT | 0x0010 |
SECURE_TASK_BIT | 0x0020 |
DCO_CAL_TASK_BIT | 0x0040 |
spare | 0x0080 to 0x4000 |
RST_AND_START_FW_BIT | 0x8000 |
All byte masks (bytes 10 to 17 and 26 to 32) are related to each target device:
Bits: | B | A | |
0 | 0 | VCC below 0.7 V | |
0 | 1 | VCC below VCC min ( 0.7 V < VCC < VCC min) | |
1 | 0 | VCC over VCC min (OK status) | |
1 | 1 | VCC over 3.8 V |
Target 1 | mask 0x01 |
Target 2 | mask 0x02 |
⋮ | ⋮ |
Target 8 | mask 0x80 |
For example, result 0x83 in connected gang mask (byte 12) means that targets 1, 2, and 8 have been detected and communication with targets successfully established.
Bytes 26 and 27 (VCC status) provide two bits to each target. Bit A for each target and bit B for each target.