MSP430 DLL API Documentation  3.14.0.0
MSP430.h
Go to the documentation of this file.
1 /*
2  * MSP430.h
3  *
4  * API for accessing MSP430 devices via JTAG.
5  *
6  * Copyright (c) 2004 - 2016 Texas Instruments Incorporated - http://www.ti.com/
7  *
8  * All rights reserved not granted herein.
9  * Limited License.
10  *
11  * Texas Instruments Incorporated grants a world-wide, royalty-free,
12  * non-exclusive license under copyrights and patents it now or hereafter
13  * owns or controls to make, have made, use, import, offer to sell and sell ("Utilize")
14  * this software subject to the terms herein. With respect to the foregoing patent
15  * license, such license is granted solely to the extent that any such patent is necessary
16  * to Utilize the software alone. The patent license shall not apply to any combinations which
17  * include this software, other than combinations with devices manufactured by or for TI (“TI Devices”).
18  * No hardware patent is licensed hereunder.
19  *
20  * Redistributions must preserve existing copyright notices and reproduce this license (including the
21  * above copyright notice and the disclaimer and (if applicable) source code license limitations below)
22  * in the documentation and/or other materials provided with the distribution
23  *
24  * Redistribution and use in binary form, without modification, are permitted provided that the following
25  * conditions are met:
26  *
27  * * No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any
28  * software provided in binary form.
29  * * any redistribution and use are licensed by TI for use only with TI Devices.
30  * * Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.
31  *
32  * If software source code is provided to you, modification and redistribution of the source code are permitted
33  * provided that the following conditions are met:
34  *
35  * * any redistribution and use of the source code, including any resulting derivative works, are licensed by
36  * TI for use only with TI Devices.
37  * * any redistribution and use of any object code compiled from the source code and any resulting derivative
38  * works, are licensed by TI for use only with TI Devices.
39  *
40  * Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or
41  * promote products derived from this software without specific prior written permission.
42  *
43  * DISCLAIMER.
44  *
45  * THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
46  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47  * IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
48  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
49  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
51  * POSSIBILITY OF SUCH DAMAGE.
52  */
53 
162 #ifndef MSP430_H
163 #define MSP430_H
164 
165 
166 #include <DLL430_SYMBOL.h>
167 #include <stdint.h>
168 
169 #if defined(_WIN32) || defined(_WIN64)
170 #include <windows.h>
171 #endif
172 
173 #if defined(__cplusplus)
174 extern "C" {
175 #endif
176 
177 #ifndef MSP430_TYPES
178 #define MSP430_TYPES
179 
181 typedef int32_t STATUS_T;
182 
186 typedef enum STATUS_CODE {
188  STATUS_OK = 0,
189 } STATUS_CODE_t;
190 
194 #pragma pack(1)
195 typedef union DEVICE_T {
198  uint8_t buffer[184];
199  struct
200  {
202  uint16_t endian;
204  uint16_t id;
206  uint8_t string[32];
208  uint16_t mainStart;
210  uint16_t infoStart;
212  uint16_t ramEnd;
214  uint16_t nBreakpoints;
216  uint16_t emulation;
218  uint16_t clockControl;
220  uint16_t lcdStart;
222  uint16_t lcdEnd;
224  uint16_t vccMinOp;
226  uint16_t vccMaxOp;
228  uint16_t hasTestVpp;
230  uint16_t ramStart;
232  uint16_t ram2Start;
234  uint16_t ram2End;
236  uint16_t infoEnd;
238  uint32_t mainEnd;
240  uint16_t bslStart;
242  uint16_t bslEnd;
244  uint16_t nRegTrigger;
246  uint16_t nCombinations;
248  uint8_t cpuArch;
250  uint8_t jtagId;
252  uint16_t coreIpId;
254  uint32_t deviceIdPtr;
256  uint16_t eemVersion;
260  uint16_t nBreakpointsDma;
262  uint16_t TrigerMask;
266  uint16_t nStateStorage;
268  uint16_t nCycleCounter;
272  uint16_t nSequencer;
274  uint16_t HasFramMemroy;
276  uint16_t mainSegmentSize;
281  uint32_t structSize;
283  uint32_t info32BitStart;
285  uint32_t info32BitEnd;
287  uint32_t ram32BitStart;
289  uint32_t ram32BitEnd;
293  uint32_t ram32BitBandEnd;
295  uint32_t main32BitStart;
297  uint32_t main32BitEnd;
299  uint32_t debug32BitStart;
301  uint32_t debug32BitEnd;
303  uint32_t bsl32BitStart;
305  uint32_t bsl32BitEnd;
316  };
317 } DEVICE_T_t;
318 #pragma pack()
319 
320 
322 #define DEVICE_UNKNOWN 0
323 
324 typedef enum CPU_ARCH_TYPE
325 {
331 
333 {
337 
338 typedef enum READ_WRITE {
339  WRITE = 0,
340  READ = 1,
342 } READ_WRITE_t;
343 
344 typedef enum ENABLE_DISABLE {
345  DISABLE = 0,
346  ENABLE = 1,
348 
350 typedef enum RESET_METHOD {
351  PUC_RESET = (1 << 0),
352  RST_RESET = (1 << 1),
353  VCC_RESET = (1 << 2),
354  FORCE_RESET = (1 << 3),
355 
369 
370 
372 typedef enum ERASE_TYPE {
375  ERASE_ALL = 2,
378 } ERASE_TYPE_t;
379 
381 typedef enum CONFIG_MODE {
388  SET_MDB_BEFORE_RUN = 9,
392 
407  // just used internal for the device code of L092 and C092
409  // set true to write the external SPI image of the L092
411  // set DEBUG_LPM_X true to start debugging of LPMx.5
412  // this will start polling for LPMX.5 events if a system notify callback was
413  // previously set using MSP430_SET_SYSTEM_NOTIFY_CALLBACK()
415  // Configure JTAG speed
417  // total device erase including IP protection
419  // Enable the CURRENTDRIVE FINE EnergyTrace Mode, for measuring small currents
421  // Enable software breakpoints
423  // Enable/disable interrupts during single step or run (0: all interrupts are exectued
424  // 1: interrupts for single step are disabled
425  // 2: interrupts when device is running are disabled)
426  // The values can be ORed. MSP432 only
428  // Configure value for JTAG lock key for 5xx devices
430 } CONFIG_MODE_t;
431 
438 
440 typedef enum INTERFACE_TYPE {
441  JTAG_IF = 0,
445  UNDEF_IF = 4,
451 
453 typedef enum INTERFACE_SPEED {
454  FAST = 0,
455  MEDIUM = 1,
456  SLOW = 2
458 
460 typedef enum FILE_TYPE {
464 } FILE_TYPE_t;
465 
466 typedef enum MESSAGE_LEVEL {
470 
471 typedef struct DETECTIONLIST
472 {
473  int errorCode;
474  char nameDevice[32];
475  char nameFET[32];
476  char nameLaunchpad[32];
478 
479 typedef void(*MessageCallbackFn)(MESSAGE_LEVEL_T, const char *);
480 
481 #define ERROR_DEFINITIONS \
482  ERROR_DEF(NO_ERR, "No error") \
483  ERROR_DEF(INITIALIZE_ERR, "Could not initialize device interface") \
484  ERROR_DEF(CLOSE_ERR, "Could not close device interface") \
485  ERROR_DEF(PARAMETER_ERR, "Invalid parameter(s)") \
486  ERROR_DEF(NO_DEVICE_ERR, "Could not find device (or device not supported)") \
487  ERROR_DEF(DEVICE_UNKNOWN_ERR, "Unknown device") \
488  ERROR_DEF(READ_MEMORY_ERR, "Could not read device memory") \
489  ERROR_DEF(WRITE_MEMORY_ERR, "Could not write device memory") \
490  ERROR_DEF(READ_FUSES_ERR, "Could not read device configuration fuses") \
491  ERROR_DEF(CONFIGURATION_ERR, "Incorrectly configured device; device derivative not supported") \
492  ERROR_DEF(VCC_ERR, "Could not set device Vcc") \
493  ERROR_DEF(RESET_ERR, "Could not reset device") \
494  ERROR_DEF(PRESERVE_RESTORE_ERR, "Could not preserve/restore device memory") \
495  ERROR_DEF(FREQUENCY_ERR, "Could not set device operating frequency") \
496  ERROR_DEF(ERASE_ERR, "Could not erase device memory") \
497  ERROR_DEF(BREAKPOINT_ERR, "Could not set device breakpoint") \
498  ERROR_DEF(STEP_ERR, "Could not single step device") \
499  ERROR_DEF(RUN_ERR, "Could not run device (to breakpoint)") \
500  ERROR_DEF(STATE_ERR, "Could not determine device state") \
501  ERROR_DEF(EEM_OPEN_ERR, "Could not open Enhanced Emulation Module") \
502  ERROR_DEF(EEM_READ_ERR, "Could not read Enhanced Emulation Module register") \
503  ERROR_DEF(EEM_WRITE_ERR, "Could not write Enhanced Emulation Module register") \
504  ERROR_DEF(EEM_CLOSE_ERR, "Could not close Enhanced Emulation Module") \
505  ERROR_DEF(FILE_OPEN_ERR, "File open error") \
506  ERROR_DEF(FILE_DETECT_ERR, "File type could not be identified") \
507  ERROR_DEF(FILE_END_ERR, "File end error") \
508  ERROR_DEF(FILE_IO_ERR, "File input/output error") \
509  ERROR_DEF(FILE_DATA_ERR, "File data error") \
510  ERROR_DEF(VERIFY_ERR, "Verification error") \
511  ERROR_DEF(BLOW_FUSE_ERR, "Could not secure the device") \
512  ERROR_DEF(FUSE_BLOWN_ERR, "The Debug Interface to the device has been secured") \
513  ERROR_DEF(INTEL_HEX_CODE_ERR, "Error within Intel Hex file") \
514  ERROR_DEF(WRITE_REGISTER_ERR, "Could not write device Register") \
515  ERROR_DEF(READ_REGISTER_ERR, "Could not read device Register") \
516  ERROR_DEF(INTERFACE_SUPPORT_ERR, "Not supported by selected Interface or Interface is not initialized") \
517  ERROR_DEF(COMM_ERR, "Interface Communication error") \
518  ERROR_DEF(NO_EX_POWER, "No external power supply detected") \
519  ERROR_DEF(LOW_EX_POWER, "External power too low") \
520  ERROR_DEF(EX_POWER_OK, "External power detected") \
521  ERROR_DEF(HIGH_EX_POWER, "External power too high") \
522  ERROR_DEF(SELFTEST_ERR, "Hardware Self Test Error") \
523  ERROR_DEF(FLASH_TIMEOUT_ERR, "Fast Flash Routine experienced a timeout") \
524  ERROR_DEF(THREAD_ERR, "Could not create thread for polling") \
525  ERROR_DEF(EEM_INIT_ERR, "Could not initialize Enhanced Emulation Module") \
526  ERROR_DEF(RESOURCE_ERR, "Insufficient resources") \
527  ERROR_DEF(CLK_CTRL_ERR, "No clock control emulation on connected device") \
528  ERROR_DEF(STATE_STOR_ERR, "No state storage buffer implemented on connected device") \
529  ERROR_DEF(READ_TRACE_ERR, "Could not read trace buffer") \
530  ERROR_DEF(VAR_WATCH_EN_ERR, "Enable the variable watch function") \
531  ERROR_DEF(SEQUENCER_ERR, "No trigger sequencer implemented on connected device") \
532  ERROR_DEF(SEQ_ENABLE_ERR, "Could not read sequencer state - Sequencer is disabled") \
533  ERROR_DEF(CLR_SEQ_TRIGGER, "Could not remove trigger - Used in sequencer") \
534  ERROR_DEF(SET_SEQ_TRIGGER, "Could not set combination - Trigger is used in sequencer") \
535  ERROR_DEF(SPMA_ACTIVE_ERR, "System Protection Module A is enabled - Device locked") \
536  ERROR_DEF(SPMA_INVALID_KEY_ERR, "Invalid SPMA key was passed to the target device - Device locked") \
537  ERROR_DEF(SPMA_MAX_TRIALS, "Device does not accept any further SPMA keys - Device locked") \
538  ERROR_DEF(USB_FET_BSL_ACTIVE_ERR, "MSP-FET430UIF Firmware erased - Bootloader active") \
539  ERROR_DEF(USB_FET_NOT_FOUND_ERR, "Could not find MSP-FET430UIF on specified COM port") \
540  ERROR_DEF(USB_FET_BUSY_ERR, "MSP-FET430UIF is already in use") \
541  ERROR_DEF(THREAD_ACTIVE_ERR, "EEM polling thread is already active") \
542  ERROR_DEF(THREAD_TERMINATE_ERR, "Could not terminate EEM polling thread") \
543  ERROR_DEF(UNLOCK_BSL_ERR, "Could not unlock BSL memory segments") \
544  ERROR_DEF(BSL_MEMORY_LOCKED_ERR, "Could not perform access, BSL memory segments are protected") \
545  ERROR_DEF(FOUND_OTHER_DEVICE, "Another device as selected was found") \
546  ERROR_DEF(WRONG_PASSWORD, "Could not enable JTAG wrong password") \
547  ERROR_DEF(UPDATE_MULTIPLE_UIF_ERR, "Only one UIF must be connected during update to v3") \
548  ERROR_DEF(CDC_UIF_ERR, "CDC-USB-FET-Driver was not installed. Please install the driver") \
549  ERROR_DEF(UIF_MANUAL_POWERCYCLE_NEEDED, "Manual reboot of USB-FET needed ! PLEASE unplug and reconnect your USB-FET!!") \
550  ERROR_DEF(INTERNAL_ERR, "Internal error") \
551  ERROR_DEF(FETRECOVERY_NEEDED, "One of the connected MSP-FETs / eZ-FETs debuggers needs recovery") \
552  ERROR_DEF(WRITE_EXTERNAL_MEM_ERR, "One of the connected MSP-FETs / eZ-FETs debuggers needs recovery") \
553  ERROR_DEF(FEATURE_NOT_SUPPORTED, "Feature not supported") \
554  ERROR_DEF(RECOVERY_MULTIPLE_UIF, "Only one MSP-FET / eZ-FET must be connected during recovery") \
555  ERROR_DEF(RECOVERY_FAILED, "MSP-FET / eZ-FET recovery failed") \
556  ERROR_DEF(UPDATE_CORE_ERR, "MSP-FET / eZ-FET core(communication layer) update failed") \
557  ERROR_DEF(UPDATE_MODULE_ERR, "MSP-FET / eZ-FET legacy module update failed") \
558  ERROR_DEF(ET_NOT_SUPPORTED, "EnergyTrace is not supported by the selected debugger") \
559  ERROR_DEF(HARDWARE_STATE_UNKNOWN, "Hardware State is unknown") \
560  ERROR_DEF(DEVICE_CRC_WRONG, "Device configuration data inconsistent. Please discontinue using/replace target device.") \
561  ERROR_DEF(EEM_NOT_ACCESSIBLE, "EEM module not accessible while running in Ultra Low Power Debug Mode - Deactivate Ultra Low Power Debug mode to enable this feature") \
562  ERROR_DEF(REMOVE_SOFTWARE_BREAKPOINT_ERR, "Failed to remove software breakpoints, please reprogram target device") \
563  ERROR_DEF(TRIGGER_CONFLICT_ERR, "Trigger configuration conflicts with existing triggers") \
564  ERROR_DEF(TARGET_RUNNING_ERR, "Operation not possible while device is running") \
565  ERROR_DEF(INCOMPATIBLE_WITH_SW_BREAKPOINT_API, "This function can not be used when software breakpoints are enabled") \
566  ERROR_DEF(SPEED_CONFIG_ERR, "JTAG/SBW speed configuration failed") \
567  ERROR_DEF(SWBP_CRITICAL_INSTRUCTION, "Software breakpoint can't be set (followed by critical value)") \
568  ERROR_DEF(ET_NOT_SUPPORTED_DEVICE, "EnergyTrace is not supported by selected MSP430 device") \
569  ERROR_DEF(ET_NOT_SUPPORTED_ULP_DEBUG, "EnergyTrace requires Ultra-Low Power debug / LPMx.5 enabled") \
570  ERROR_DEF(LEGACY_DEVICE_ERR, "Legacy version of silicon used, which is no longer supported. Please contact TI to obtain a newer version.") \
571  ERROR_DEF(SECURE_NOT_SUPPORTED_ERR, "Secure device via the IDE is not supported. See Device User Guide for further information.") \
572  ERROR_DEF(CYCLE_COUNTER_CONFLICT, "Cycle counter is in basic mode. Set to advanced mode to use this function.") \
573  ERROR_DEF(NO_LPT_SUPPORT, "Parallel port FET (MSP-FETP430IF) is no longer supported.") \
574  ERROR_DEF(WRONG_TARGET_ARCHITECTURE, "Wrong target architecture was selected - Valid architectures are MSP430 or MSP432_M4.") \
575  ERROR_DEF(MSP432_TOTAL_ERASE, "Mass erase executed. Please power-cycle your device and restart the debug session.") \
576  ERROR_DEF(POSSIBLE_OVERCURRENT, "Your connected hardware might drain too much power from the debugger.This results in an overcurrent.") \
577  ERROR_DEF(FET_UPDATE_FAILED, "MSP Tool firmware update failed. Please ensure the USB or Backchannel UART connection is not in use.") \
578  ERROR_DEF(INTERFACE_SUPPORT_ERR_MSP432, "MSP432 devices are not supported using the MSPFET430-UIF") \
579  ERROR_DEF(DAP_LOCK_WRONG_PROTOCOL, "DAP is locked or wrong debug protocol selected.") \
580  ERROR_DEF(DEVICE_DB_ERR, "Device database not loaded.") \
581  ERROR_DEF(INVALID_ERR, "Invalid error number")
582 
584 #define ERROR_DEF(errorEnum, errorString) errorEnum,
586 #undef ERROR_DEF
587 
588 // System events
589 typedef enum SYSTEM_EVENT_MSP
590 {
606 
607 typedef void (* SYSTEM_NOTIFY_CALLBACK) (SYSTEM_EVENT_MSP_t MySystemEvent);
608 
609 #endif /* MSP430_TYPES */
610 
611 // Functions. -----------------------------------------------------------------
628 DLL430_SYMBOL STATUS_T WINAPI MSP430_SET_SYSTEM_NOTIFY_CALLBACK(SYSTEM_NOTIFY_CALLBACK parSystemNotifyCallback);
629 
630 // Functions. -----------------------------------------------------------------
649 DLL430_SYMBOL STATUS_T WINAPI MSP430_SetTargetArchitecture(TARGET_ARCHITECTURE_t architecture);
650 
651 /*
652 \fn STATUS_T MSP430_LoadDeviceDb(const char* file);
653 
654 \brief Load the device database from XML archive.
655 
656 \param file: The filename of a zip archive containing the device info files.
657 
658 \return STATUS_OK: The device info was loaded.
659 \n STATUS_ERROR: The device info was not loaded.
660 */
661 DLL430_SYMBOL STATUS_T WINAPI MSP430_LoadDeviceDb(const char* file);
662 
663 /*
664 \fn STATUS_T MSP430_DumpDeviceDb(const char* file);
665 
666 \brief Dumps the device database to a XML file.
667 
668 \param file: The filename of a zip archive containing the device info files.
669 
670 \return STATUS_OK: The device info was dumped.
671 \n STATUS_ERROR: The device info was not dumped.
672 */
673 DLL430_SYMBOL STATUS_T WINAPI MSP430_DumpDeviceDb(const char* file);
674 
683 DLL430_SYMBOL STATUS_T WINAPI MSP430_ClearDeviceDb();
684 
730 DLL430_SYMBOL STATUS_T WINAPI MSP430_Initialize(const char* port, int32_t* version);
731 
748 DLL430_SYMBOL STATUS_T WINAPI MSP430_Close(int32_t vccOff);
749 
750 
758 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetJtagID(int32_t* JtagId);
759 
777 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetFoundDevice(uint8_t* FoundDevice, int32_t count);
778 
812 DLL430_SYMBOL STATUS_T WINAPI MSP430_OpenDevice(const char* Device, const char* Password, int32_t PwLength,int32_t DeviceCode, int32_t setId);
813 
814 
833 DLL430_SYMBOL STATUS_T WINAPI MSP430_Device(int32_t localDeviceId, uint8_t* buffer, int32_t count);
834 
880 DLL430_SYMBOL STATUS_T WINAPI MSP430_Configure(int32_t mode, int32_t value);
881 
905 DLL430_SYMBOL STATUS_T WINAPI MSP430_VCC(int32_t voltage);
906 
907 
925 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetCurVCCT(int32_t* voltage);
926 
951 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetExtVoltage(int32_t* voltage, int32_t* state);
952 
953 
984 DLL430_SYMBOL STATUS_T WINAPI MSP430_Reset(int32_t method, int32_t execute, int32_t releaseJTAG);
985 
1025 DLL430_SYMBOL STATUS_T WINAPI MSP430_Erase(int32_t type, int32_t address, int32_t length);
1026 
1056 DLL430_SYMBOL STATUS_T WINAPI MSP430_Memory(int32_t address, uint8_t* buffer, int32_t count, int32_t rw);
1057 
1058 #define MSP430_Read_Memory(ADDRESS, BUFFER, COUNT) MSP430_Memory(ADDRESS, BUFFER, COUNT, READ)
1059 #define MSP430_Write_Memory(ADDRESS, BUFFER, COUNT) MSP430_Memory(ADDRESS, BUFFER, COUNT, WRITE)
1060 
1079 DLL430_SYMBOL STATUS_T WINAPI MSP430_Secure(void);
1080 
1104 #if ! defined(uController)
1105 DLL430_SYMBOL STATUS_T WINAPI MSP430_ReadOutFile(int32_t wStart, int32_t wLength, const char* lpszFileName, int32_t iFileType);
1106 #endif
1107 
1149 #if ! defined(uController)
1150 DLL430_SYMBOL STATUS_T WINAPI MSP430_ProgramFile(const char* File, int32_t eraseType, int32_t verifyMem);
1151 #endif
1152 
1180 #if ! defined(uController)
1181 DLL430_SYMBOL STATUS_T WINAPI MSP430_VerifyFile(const char* File);
1182 #endif
1183 
1206 DLL430_SYMBOL STATUS_T WINAPI MSP430_VerifyMem(int32_t StartAddr, int32_t Length, const uint8_t* DataArray);
1207 
1229 DLL430_SYMBOL STATUS_T WINAPI MSP430_EraseCheck(int32_t StartAddr, int32_t Length);
1230 
1241 DLL430_SYMBOL int32_t WINAPI MSP430_Error_Number(void);
1242 
1253 #if ! defined(uController)
1254 DLL430_SYMBOL const char* WINAPI MSP430_Error_String(int32_t errorNumber);
1255 #endif
1256 
1271 #if ! defined(uController)
1272 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetNumberOfUsbIfs(int32_t* Number);
1273 #endif
1274 
1301 #if ! defined(uController)
1302 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetNameOfUsbIf(int32_t Idx, char** Name, int32_t* Status);
1303 #endif
1304 
1314 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetInterface_Type(enum INTERFACE_TYPE* type);
1315 
1326 DLL430_SYMBOL STATUS_T WINAPI MSP430_RegisterMessageCallback(MessageCallbackFn callback);
1327 
1339 DLL430_SYMBOL STATUS_T WINAPI MSP430_Autodetect(struct DETECTIONLIST *list, uint32_t *numElements, uint32_t sizeOfStruct);
1340 
1341 
1351 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetFETName(char *str, uint32_t size);
1352 
1363 DLL430_SYMBOL STATUS_T WINAPI MSP430_GetLaunchpadName(const char *device, const char *fetname, char *launchpadname, uint32_t size);
1364 
1365 #if defined(__cplusplus)
1366 }
1367 #endif
1368 
1369 #endif // MSP430_H
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetInterface_Type(enum INTERFACE_TYPE *type)
Determine the type of interface for the connection to the device.
System event FET restart needed.
Definition: MSP430.h:596
READ_WRITE
Definition: MSP430.h:338
Definition: MSP430.h:334
uint16_t nBreakpointsReadWrite
Definition: MSP430.h:259
uint16_t clockControl
Clock control level.
Definition: MSP430.h:218
Definition: MSP430.h:410
Definition: MSP430.h:444
uint16_t eemVersion
The EEM Version Number.
Definition: MSP430.h:256
enum FILE_TYPE FILE_TYPE_t
File types.
uint32_t ram32BitBandStart
Indicates the start of the 32-bit RAM Bit-Band alias region space.
Definition: MSP430.h:291
enum RESET_METHOD RESET_METHOD_t
Device reset methods.
uint16_t ram2Start
RAM2 starting address.
Definition: MSP430.h:232
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetFoundDevice(uint8_t *FoundDevice, int32_t count)
DLL430_SYMBOL STATUS_T WINAPI MSP430_Initialize(const char *port, int32_t *version)
Initialize the interface.
Definition: MSP430.h:339
uint16_t endian
The value 0xaa55.
Definition: MSP430.h:202
uint16_t lcdEnd
LCD ending address.
Definition: MSP430.h:222
uint32_t main32BitStart
Indicates the start of the 32-bit MAIN space.
Definition: MSP430.h:295
Definition: MSP430.h:328
uint32_t main32BitEnd
Indicates the end of the 32-bit MAIN space.
Definition: MSP430.h:297
Definition: MSP430.h:434
Definition: MSP430.h:386
CONFIG_MODE
Configurations to set with MSP430_Configure.
Definition: MSP430.h:381
struct DETECTIONLIST DETECTIONLIST_T
uint16_t nCombinations
Number of EEM Trigger Combinations.
Definition: MSP430.h:246
FILE_TYPE
File types.
Definition: MSP430.h:460
uint32_t ram32BitStart
Indicates the start of the 32-bit RAM space.
Definition: MSP430.h:287
int32_t nDataWatchpoints
number of DataWatchpoints (if hardware resources are separated) or -1 if hardware resources are share...
Definition: MSP430.h:307
ERROR_CODE
Definition: MSP430.h:585
uint32_t infoSecond32BitStart
Indicates the start of the second 32-bit Info memory space.
Definition: MSP430.h:311
MESSAGE_LEVEL
Definition: MSP430.h:466
uint16_t mainSegmentSize
Flash segment size for Main.
Definition: MSP430.h:276
SYSTEM_EVENT_MSP
Definition: MSP430.h:589
uint16_t coreIpId
The CoreIP ID.
Definition: MSP430.h:252
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetNumberOfUsbIfs(int32_t *Number)
Returns the number of MSP-FET430UIF USB FETs connected to the PC system.
DLL430_SYMBOL STATUS_T WINAPI MSP430_Reset(int32_t method, int32_t execute, int32_t releaseJTAG)
Reset the device using the specified method(s). Optionally start device execution, and release the JTAG control signals.
Definition: MSP430.h:449
Definition: MSP430.h:335
Definition: MSP430.h:408
Definition: MSP430.h:188
uint16_t ramEnd
RAM ending address.
Definition: MSP430.h:212
enum ERROR_CODE ERROR_CODE_t
uint32_t infoSecond32BitEnd
Indicates the end of the second 32-bit Info memory space.
Definition: MSP430.h:313
Definition: MSP430.h:367
uint32_t bsl32BitStart
Indicates the start of the 32-bit BSL memory space.
Definition: MSP430.h:303
Definition: MSP430.h:462
enum TARGET_ARCHITECTURE TARGET_ARCHITECTURE_t
void(* MessageCallbackFn)(MESSAGE_LEVEL_T, const char *)
Definition: MSP430.h:479
Definition: MSP430.h:384
System event FET connection is lost.
Definition: MSP430.h:592
uint32_t ram32BitEnd
Indicates the end of the 32-bit RAM space.
Definition: MSP430.h:289
uint16_t bslStart
BSL starting address.
Definition: MSP430.h:240
uint16_t paddingForLegacyDll
Definition: MSP430.h:279
DLL430_SYMBOL STATUS_T WINAPI MSP430_Secure(void)
The device is secured (i.e., the JTAG security fuse is blown). MSP-FET430UIF USB JTAG adaptor >>> D...
uint16_t HasFramMemroy
Msp430 has FRAM Memory.
Definition: MSP430.h:274
DLL430_SYMBOL STATUS_T WINAPI MSP430_ReadOutFile(int32_t wStart, int32_t wLength, const char *lpszFileName, int32_t iFileType)
Read the specified range of device memory, and write it to the specified file.
uint16_t TrigerMask
Trigger Mask for Breakpoint.
Definition: MSP430.h:262
enum INTERFACE_SPEED INTERFACE_SPEED_t
Configurations values for CONFIG_MODE INTERFACE_SPEED.
int32_t nDataWatchpointsValueMatch
number of DataWatchpoints that can be used to match against an address and a value or -1 ...
Definition: MSP430.h:309
DLL430_SYMBOL STATUS_T WINAPI MSP430_SetTargetArchitecture(TARGET_ARCHITECTURE_t architecture)
uint16_t nRegTrigger
Number of CPU Register Trigger.
Definition: MSP430.h:244
Definition: MSP430.h:326
Definition: MSP430.h:436
uint32_t ram32BitBandEnd
Indicates the end of the 32-bit RAM Bit-Band alias region space.
Definition: MSP430.h:293
enum MESSAGE_LEVEL MESSAGE_LEVEL_T
enum INTERFACE_TYPE INTERFACE_TYPE_t
Configurations values for CONFIG_MODE INTERFACE_MODE.
DLL430_SYMBOL const char *WINAPI MSP430_Error_String(int32_t errorNumber)
Determine the string associated with errorNumber.
Definition: MSP430.h:358
uint16_t nBreakpointsOptions
Breakpoint Modes.
Definition: MSP430.h:258
System event device entered LPMx.5.
Definition: MSP430.h:598
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetJtagID(int32_t *JtagId)
Deprecated.
uint16_t ram2End
RAM2 ending address.
Definition: MSP430.h:234
uint32_t debug32BitStart
Indicates the start of the 32-bit DEBUG memory space.
Definition: MSP430.h:299
DLL430_SYMBOL STATUS_T WINAPI MSP430_Close(int32_t vccOff)
Close the interface.
Definition: MSP430.h:429
Definition: MSP430.h:420
Definition: MSP430.h:406
Definition: MSP430.h:585
Definition: MSP430.h:445
uint8_t jtagId
The JTAG ID - value returned on an instruction shift.
Definition: MSP430.h:250
Definition: MSP430.h:373
Definition: MSP430.h:446
enum CPU_ARCH_TYPE CPU_ARCH_TYPE_t
DLL430_SYMBOL STATUS_T WINAPI MSP430_VerifyFile(const char *File)
Compare the MSP430 memory and the contents of the specified file.
DLL430_SYMBOL STATUS_T WINAPI MSP430_Erase(int32_t type, int32_t address, int32_t length)
Erase the device FLASH/FRAM memory.
DLL430_SYMBOL STATUS_T WINAPI MSP430_Memory(int32_t address, uint8_t *buffer, int32_t count, int32_t rw)
Read and write the device memory. "Device memory" includes the Special Function Registers (i...
CPU_ARCH_TYPE
Definition: MSP430.h:324
Definition: MSP430.h:346
Definition: MSP430.h:448
enum ERASE_TYPE ERASE_TYPE_t
FLASH erase type.
uint32_t deviceIdPtr
The Device-ID Pointer.
Definition: MSP430.h:254
uint8_t buffer[184]
Definition: MSP430.h:198
System event - Timout occourt during FPGA DR/IR shift.
Definition: MSP430.h:604
uint32_t info32BitStart
Indicates the start of the 32-bit RAM space.
Definition: MSP430.h:283
Definition: MSP430.h:468
DLL430_SYMBOL STATUS_T WINAPI MSP430_ClearDeviceDb()
Remove all loaded devices from the device database.
Definition: MSP430.h:416
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetExtVoltage(int32_t *voltage, int32_t *state)
Detect if external voltage is supplied to the target device. Report back the value of an external vol...
DLL430_SYMBOL STATUS_T WINAPI MSP430_LoadDeviceDb(const char *file)
enum DISABLE_INTERRUPTS_TYPE DISABLE_INTERRUPTS_TYPE_t
Configurations values for CONFIG_MODE DISABLE_INTERRUPTS.
Definition: MSP430.h:329
uint32_t info32BitEnd
Indicates the end of the 32-bit RAM space.
Definition: MSP430.h:285
void(* SYSTEM_NOTIFY_CALLBACK)(SYSTEM_EVENT_MSP_t MySystemEvent)
Definition: MSP430.h:607
Definition: MSP430.h:374
DLL430_SYMBOL STATUS_T WINAPI MSP430_DumpDeviceDb(const char *file)
Definition: MSP430.h:383
uint16_t nCycleCounterOperations
Cycle couter modes.
Definition: MSP430.h:270
Definition: MSP430.h:442
Definition: MSP430.h:187
Definition: MSP430.h:422
DLL430_SYMBOL STATUS_T WINAPI MSP430_Configure(int32_t mode, int32_t value)
Configure the mode(s) of the device and/or the software. Possible configuration modes are covered by ...
uint8_t cpuArch
The MSP430 architecture (non-X, X or Xv2).
Definition: MSP430.h:248
Definition: MSP430.h:363
Definition: MSP430.h:418
Definition: MSP430.h:340
enum READ_WRITE READ_WRITE_t
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetLaunchpadName(const char *device, const char *fetname, char *launchpadname, uint32_t size)
Returns the name of the launchpad in case the fetname and devicename are a valid launchpad combinatio...
Definition: MSP430.h:353
enum CONFIG_MODE CONFIG_MODE_t
Configurations to set with MSP430_Configure.
uint32_t structSize
Indicates the complete size in bytes of the structure.
Definition: MSP430.h:281
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetCurVCCT(int32_t *voltage)
Report back the current voltage supplied to the target device.
uint16_t nSequencer
Msp430 has Sequencer.
Definition: MSP430.h:272
Definition: MSP430.h:455
uint16_t lcdStart
LCD starting address.
Definition: MSP430.h:220
Definition: MSP430.h:467
DLL430_SYMBOL STATUS_T WINAPI MSP430_SET_SYSTEM_NOTIFY_CALLBACK(SYSTEM_NOTIFY_CALLBACK parSystemNotifyCallback)
Initialize the SYSTEM NOTIFYCALLBACK.
uint16_t id
Identification number.
Definition: MSP430.h:204
Definition: MSP430.h:427
int32_t STATUS_T
this is the definition for the DLL functions return value
Definition: MSP430.h:181
enum STATUS_CODE STATUS_CODE_t
Status codes of the DLL functions.
System event devices wakes up from LPMx.5.
Definition: MSP430.h:600
Definition: MSP430.h:456
Definition: MSP430.h:345
uint32_t mainEnd
MAIN ending address.
Definition: MSP430.h:238
Definition: MSP430.h:385
DLL430_SYMBOL int32_t WINAPI MSP430_Error_Number(void)
Determine the number of the error when a MSP430_xxx() function returns STATUS_ERROR.
DLL430_SYMBOL STATUS_T WINAPI MSP430_RegisterMessageCallback(MessageCallbackFn callback)
Defines the callback function to call for messages The callback will be automatically cleared by call...
union DEVICE_T DEVICE_T_t
Device information structure.
INTERFACE_SPEED
Configurations values for CONFIG_MODE INTERFACE_SPEED.
Definition: MSP430.h:453
uint16_t nBreakpoints
Number of breakpoints.
Definition: MSP430.h:214
uint32_t debug32BitEnd
Indicates the end of the 32-bit DEBUG memory space.
Definition: MSP430.h:301
RESET_METHOD
Device reset methods.
Definition: MSP430.h:350
uint16_t ramStart
RAM starting address.
Definition: MSP430.h:230
enum ENABLE_DISABLE ENABLE_DISABLE_t
TARGET_ARCHITECTURE
Definition: MSP430.h:332
System event - overcurrent detection on JTAG lines or VCC line.
Definition: MSP430.h:602
uint16_t emulation
Emulation level.
Definition: MSP430.h:216
DLL430_SYMBOL STATUS_T WINAPI MSP430_EraseCheck(int32_t StartAddr, int32_t Length)
Verify that the specified memory range is erased.
uint16_t nStateStorage
MSP430 has Stage Storage.
Definition: MSP430.h:266
uint16_t bslEnd
BSL ending address.
Definition: MSP430.h:242
Definition: MSP430.h:391
ENABLE_DISABLE
Definition: MSP430.h:344
uint32_t info32BitSegmentSize
Flash segment size for 32-bit Info memory space (MSP432 SimpleLink only)
Definition: MSP430.h:315
Definition: MSP430.h:377
Definition: MSP430.h:403
Device information structure.
Definition: MSP430.h:195
STATUS_CODE
Status codes of the DLL functions.
Definition: MSP430.h:186
Definition: MSP430.h:414
Definition: MSP430.h:341
Definition: MSP430.h:463
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetFETName(char *str, uint32_t size)
Returns the name of the FET.
INTERFACE_TYPE
Configurations values for CONFIG_MODE INTERFACE_MODE.
Definition: MSP430.h:440
uint16_t nCycleCounter
Number of cycle counters of MSP430.
Definition: MSP430.h:268
uint32_t bsl32BitEnd
Indicates the end of the 32-bit BSL memory space.
Definition: MSP430.h:305
Definition: MSP430.h:382
Definition: MSP430.h:351
forces a Power up clear reset
Definition: MSP430.h:360
Definition: MSP430.h:352
Definition: MSP430.h:375
Definition: MSP430.h:471
uint16_t nRegTriggerOperations
Register Trigger modes.
Definition: MSP430.h:264
DLL430_SYMBOL STATUS_T WINAPI MSP430_GetNameOfUsbIf(int32_t Idx, char **Name, int32_t *Status)
Get the name of a Virtual Com Port (VCP), Human Interface Device (HID) or Communication Device Class ...
int errorCode
Definition: MSP430.h:473
Definition: MSP430.h:441
uint16_t vccMinOp
Vcc minimum during operation [mVolts].
Definition: MSP430.h:224
DLL430_SYMBOL STATUS_T WINAPI MSP430_OpenDevice(const char *Device, const char *Password, int32_t PwLength, int32_t DeviceCode, int32_t setId)
Identify the device, and compare the found device to the expected device.
DISABLE_INTERRUPTS_TYPE
Configurations values for CONFIG_MODE DISABLE_INTERRUPTS.
Definition: MSP430.h:433
uint16_t infoEnd
INFO ending address.
Definition: MSP430.h:236
Definition: MSP430.h:461
uint16_t vccMaxOp
Vcc maximum during operation [mVolts].
Definition: MSP430.h:226
uint16_t mainStart
MAIN MEMORY starting address.
Definition: MSP430.h:208
System event device connection is lost.
Definition: MSP430.h:594
ERASE_TYPE
FLASH erase type.
Definition: MSP430.h:372
Definition: MSP430.h:447
Definition: MSP430.h:443
DLL430_SYMBOL STATUS_T WINAPI MSP430_VerifyMem(int32_t StartAddr, int32_t Length, const uint8_t *DataArray)
Definition: MSP430.h:376
DLL430_SYMBOL STATUS_T WINAPI MSP430_Device(int32_t localDeviceId, uint8_t *buffer, int32_t count)
Obtain the device information.
Definition: MSP430.h:327
DLL430_SYMBOL STATUS_T WINAPI MSP430_ProgramFile(const char *File, int32_t eraseType, int32_t verifyMem)
The contents of the specified file are input, and then written to the device. The device is optionall...
DLL430_SYMBOL STATUS_T WINAPI MSP430_VCC(int32_t voltage)
Set the device Vcc pin to voltage/1000 volts. The USB JTAG adaptor also checks if external power is ...
Definition: MSP430.h:454
DLL430_SYMBOL STATUS_T WINAPI MSP430_Autodetect(struct DETECTIONLIST *list, uint32_t *numElements, uint32_t sizeOfStruct)
uint16_t infoStart
INFORMATION MEMORY starting address.
Definition: MSP430.h:210
uint16_t nBreakpointsDma
Definition: MSP430.h:260
Definition: MSP430.h:354
Definition: MSP430.h:435
uint16_t hasTestVpp
Device has TEST/VPP.
Definition: MSP430.h:228
enum SYSTEM_EVENT_MSP SYSTEM_EVENT_MSP_t