SLAU358Q September 2011 – October 2019
MSPGANG_GetProgressStatus gets progress status from MSP-GANG. The data received contains a Gang Mask of all processes done in the previous function. Each bit in the Gang mask represents one targeted device:
bit 0 → Target 1, bit 1 → Target 2, ... bit 7 → Target 8
For example, when connected_gang_mask is 0x7A, then targets 2, 4, 5, 6, and 7 are detected, and communication with these targets is established. The cumulative mask contains the final result for all targets.
Syntax
LONG MSPGANG_GetProgressStatus(void *lpData)
Arguments
void *lpData | Pointer to structure below |
Result
LONG | Error code |
#define SCRIPT_TEXT_SIZE 16
union GANG_PROGRESS_STATUS
{
BYTE bytes[PROGRESS_STATUS_SIZE+4];
struct
{
BYTE header;
BYTE ctr;
WORD task_ctr;
WORD chunk_ctr;
BYTE run;
BYTE ack;
WORD Finished_tasks_mask;
//--- 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
BYTE cumulative;
//target masks
// TARGET_1_MASK 0x01
// TARGET_2_MASK 0x02
// TARGET_3_MASK 0x04
// TARGET_4_MASK 0x08
// TARGET_5_MASK 0x10
// TARGET_6_MASK 0x20
// TARGET_7_MASK 0x40
// TARGET_8_MASK 0x80
BYTE Rq_gang_mask;
BYTE Connected_gang_mask;
BYTE Erased_gang_mask;
BYTE BlankCheck_gang_mask;
BYTE Programmed_gang_mask;
BYTE Verified_gang_mask;
BYTE Secured_gang_mask;
BYTE spare[6];
BYTE error_no;
BYTE VTIO_32mV;
BYTE VccSt_LOW;
BYTE VccSt_HI;
// VccSt_LOW, VccSt_HI provide 2 bits to each target.
// Bit A for each target and bit B for each target.
// 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
BYTE VccErr;
// current Vcc below min
BYTE VccErr_Cumulative;
// Cumulative (during programming) Vcc below min
BYTE JTAG_init_err_mask;
BYTE JTAG_Fuse_already_blown_mask;
BYTE Wrong_MCU_ID_mask;
BYTE Progress_bar;
// 0...100%
char comment[SCRIPT_TEXT_SIZE];
}st;
};