MSP430 DLL API Documentation  3.9.1.2
MSP430_EEM.h
Go to the documentation of this file.
1 /*
2  * MSP430_EEM.h
3  *
4  * API for accessing EEM functionality of MSP430 library.
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 
100 #ifndef MSP430_EEM_H
101 #define MSP430_EEM_H
102 
103 
104 #include <MSP430_Debug.h>
105 
106 #if defined(__cplusplus)
107 extern "C" {
108 #endif
109 
110 #ifndef MSP430_EEM_TYPES
111 #define MSP430_EEM_TYPES
112 
117 #define MAXHANDLE 20
118 
122 #define MAXTRIGGER 8
123 
127 #define N_TRACE_POS 8
128 
132 #define MAX_SEQ_TRIGGER 4
133 
137 #define MAX_SEQ_STATE 4
138 
146 typedef struct MESSAGE_ID {
152  uint32_t uiMsgIdStorage;
154  uint32_t uiMsgIdState;
156  uint32_t uiMsgIdWarning;
159 }
167 
168 
170 typedef enum WarningCodes {
187 } WarCode_t;
188 
189 
191 typedef enum BpMode {
193  BP_CLEAR = 0,
195  BP_CODE = 1,
197  BP_RANGE = 2,
202 } BpMode_t;
203 
204 
206 typedef enum BpType {
208  BP_MAB = 0,
210  BP_MDB = 1,
213 } BpType_t;
214 
244 typedef enum BpAccess {
246  BP_FETCH = 0,
258  BP_READ = 6,
260  BP_WRITE = 7,
264  BP_DMA = 9,
266  BP_NO_DMA = 10,
279 } BpAccess_t;
280 
281 
283 typedef enum BpAction {
285  BP_NONE = 0,
287  BP_BRK = 1,
289  BP_STO = 2,
293  BP_CC = 4
294 } BpAction_t;
295 
296 
301 typedef enum BpOperat {
303  BP_EQUAL = 0,
307  BP_LOWER = 2,
310 } BpOperat_t;
311 
312 
317 typedef enum BpRangeAction {
323 
324 
329 typedef enum BpCondition {
333  BP_COND = 1,
334 } BpCondition_t;
335 
340 typedef enum BpConditionValSize {
345 
350 typedef struct BREAKPOINT {
354  int32_t lAddrVal;
358  int32_t lReg;
366  int32_t lMask;
368  int32_t lRangeEndAdVa;
374  uint32_t lCondMdbVal;
378  int32_t lCondMask;
382  uint16_t wExtCombine;
385 }
393 
394 
399 typedef enum CbControl {
401  CB_SET = 0,
403  CB_CLEAR = 1,
404 } CbControl_t;
405 
406 
407 
408 
410 typedef enum TrControl {
416  TR_RESET = 2,
417 } TrControl_t;
418 
420 typedef enum TrMode {
426  TR_SHOT = 2,
429 } TrMode_t;
430 
432 typedef enum TrAction {
434  TR_FETCH = 0,
437 } TrAction_t;
438 
443 typedef struct TRACE_CTRL {
450 }
451 
459 
466 typedef struct TRACE_BUFFER {
468  int32_t lTrBufMAB;
470  int32_t lTrBufMDB;
472  uint16_t wTrBufCNTRL;
473 }
474 
481 
482 
483 
484 
486 typedef enum VwEnable {
491 } VwEnable_t;
492 
494 typedef enum VwControl {
496  VW_SET = 0,
498  VW_CLEAR = 1,
499 } VwControl_t;
500 
502 typedef enum VwDataType {
504  VW_8 = 0,
506  VW_16 = 1,
508  VW_32 = 2,
509 } VwDataType_t;
510 
515 typedef struct VARIABLE_WATCH {
519  uint32_t lAddr;
522 }
529 
530 
535 typedef struct VAR_WATCH_RESOURCES {
537  uint16_t vwHandle;
539  uint32_t lAddr;
542 }
549 
550 
552 typedef enum CcControl {
557 } CcControl_t;
558 
560 typedef enum CcModule {
564  CC_WDT = (1 << 1),
566  CC_TIMER_A = (1 << 2),
568  CC_TIMER_B = (1 << 3),
570  CC_BASIC_TIMER = (1 << 4),
572  CC_LCD_FREQ = (1 << 5),
574  CC_TIMER_COUNTER = (1 << 6),
576  CC_TIMER_PORT = (1 << 7),
578  CC_USART0 = (1 << 8),
580  CC_USART1 = (1 << 9),
582  CC_FLASH_CNTRL = (1 << 10),
584  CC_ADC = (1 << 11),
586  CC_ACLK = (1 << 12),
588  CC_SMCLK = (1 << 13),
590  CC_MCLK = (1 << 14),
591 } CcModule_t;
592 
593 
599 typedef enum CcGeneralCLK {
603  CC_STP_ACLK = (1 << 1),
605  CC_STP_SMCLK = (1 << 2),
607  CC_STP_MCLK = (1 << 3),
609  CC_STP_TACLK = (1 << 5),
611 
616 typedef struct CLOCK_CONTROL {
620  uint16_t ccModule;
622  uint16_t ccGeneralCLK;
623 }
631 
632 typedef struct CLOCK_CONTROL2 {
636  uint32_t ccModule;
638  uint16_t ccGeneralCLK;
639 }
647 
648 
650 typedef enum SeqControl {
655 } SeqControl_t;
656 
658 typedef enum SeqState {
667 } SeqState_t;
668 
674 typedef struct SEQUENCER {
678  uint16_t wHandleRstTrig;
681  // State X:
683  SeqState_t seqNextStateX[MAX_SEQ_STATE];
685  uint16_t wHandleStateX[MAX_SEQ_STATE];
687  SeqState_t seqNextStateY[MAX_SEQ_STATE];
689  uint16_t wHandleStateY[MAX_SEQ_STATE];
690 }
697 
698 
700 typedef enum {
706 
708 typedef enum {
724 
726 typedef enum {
736 
738 typedef enum
739 {
749 
751 typedef enum
752 {
760 
765 typedef struct
766 {
775 }
781 
782 
783 //==============================================================================
784 //==============================================================================
785 
793 typedef void (* MSP430_EVENTNOTIFY_FUNC) (uint32_t MsgId, uint32_t wParam, int32_t lParam, int32_t clientHandle);
794 
795 //==============================================================================
796 #endif /* MSP430_EEM_TYPES */
797 
867 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_Init(MSP430_EVENTNOTIFY_FUNC callback, int32_t clientHandle, const MessageID_t* pMsgIdBuffer);
868 
899 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetBreakpoint(uint16_t* pwBpHandle, const BpParameter_t* pBpBuffer);
900 
901 
902 
903 
922 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetBreakpoint(uint16_t wBpHandle, BpParameter_t* pBpDestBuffer);
923 
924 
925 
926 
960 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetCombineBreakpoint(CbControl_t CbControl, uint16_t wCount, uint16_t* pwCbHandle, const uint16_t* pawBpHandle);
961 
962 
963 
964 
988 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetCombineBreakpoint(uint16_t wCbHandle, uint16_t* pwCount, uint16_t* pawBpHandle);
989 
990 
991 
992 
1013 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetTrace(const TrParameter_t* pTrBuffer);
1014 
1015 
1016 
1017 
1035 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetTrace(TrParameter_t* pTrDestBuffer);
1036 
1037 
1038 
1039 
1060 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_ReadTraceBuffer(TraceBuffer_t* pTraceBuffer);
1061 
1062 
1063 
1086 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_ReadTraceData(TraceBuffer_t* pTraceBuffer, uint32_t* pulCount);
1087 
1088 
1089 
1101 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_RefreshTraceBuffer(void);
1102 
1103 
1104 
1105 
1129 
1130 
1131 
1132 
1154 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetVariable(uint16_t* pVwHandle, const VwParameter_t* pVwBuffer);
1155 
1156 
1157 
1158 
1180 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetVariableWatch(VwEnable_t* pVwEnable, VwResources_t* paVwDestBuffer);
1181 
1182 
1183 
1184 
1210 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetClockControl(const CcParameter_t* pCcBuffer);
1211 
1212 
1213 
1239 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetClockControl2(const CcParameter2_t* pCcBuffer);
1240 
1241 
1242 
1243 
1261 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetClockControl(CcParameter_t* pCcDestBuffer);
1262 
1263 
1264 
1282 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetClockControl2(CcParameter2_t* pCcDestBuffer);
1283 
1284 
1285 
1286 
1313 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_SetSequencer(const SeqParameter_t* pSeqBuffer);
1314 
1315 
1316 
1317 
1335 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_GetSequencer(SeqParameter_t* pSeqDestBuffer);
1336 
1337 
1338 
1339 
1357 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_ReadSequencerState(SeqState_t* pSeqState);
1358 
1359 
1360 
1361 
1380 
1381 
1382 
1383 
1403 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_ConfigureCycleCounter(uint32_t wCounter, CycleCounterConfig_t pCycConfig);
1404 
1405 
1406 
1407 
1427 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_ReadCycleCounterValue(uint32_t wCounter, uint64_t* value);
1428 
1429 
1430 
1431 
1450 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_WriteCycleCounterValue(uint32_t wCounter, uint64_t value);
1451 
1452 
1453 
1454 
1472 DLL430_SYMBOL STATUS_T WINAPI MSP430_EEM_ResetCycleCounter(uint32_t wCounter);
1473 
1474 
1475 #if defined(__cplusplus)
1476 }
1477 #endif
1478 
1479 #endif // MSP430_EEM_H