/FN0004/ InitTarget
long int InitTarget(char* lpszDeviceName)
Initializes the JTAG access to the target device, detects the device type, and reports when the detected device does not match the parameter DeviceName passed.
lpszDeviceName: name of the device in file device.cfg
Example: lFuncReturn = InitTarget (”MSP430F1121”)
/FN0005/ ReleaseTarget
long int ReleaseTarget(void)
This function performs a PUC and releases the JTAG access to the target device. All JTAG signals from the serial programming adapter are switched to
Example: lFuncReturn = ReleaseTarget()
/FN0006/ Erase
long int Erase(long int wStart, long int wLength, long int Flags)
This function erases flash memory (if available). The protection of areas can be disabled by setting the DISABLE_TI_MEM_PROTECT−Bit in Flags.
wStart: start address of the area to be erased. Allowed values : 0x0000−0xFFFE (see memory map of the corresponding device)
wLength: length of the area. Allowed values : 0x0000−0xFFFE (see the memory map of the corresponding device)
If erasing information and main memory segments, first erase the information memory segments, then erase the main memory segments.
The mass erase sequence then would be:
Erase(InfoStart,InfoLength,0);
Erase(MainStart,MainLength,0);
The function invokes a mass erase for information or main memory if the start address and the complete memory range of the information or main memory is specified. If the range specified is not complete for that device, a segment erase of the individual segments is performed.
Flags
DISABLE_TI_MEM_PROTECT (0x01)
If this bit is set, the memory protection settings in device.cfg are ignored.
Example:
lFuncReturn = Erase(long:0xF000, long:0x1000, long:1)