MSP430 DLL API Documentation
3.9.1.2
Main Page
Classes
Files
File List
File Members
DLL430_v3
include
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
{
148
uint32_t
uiMsgIdSingleStep
;
150
uint32_t
uiMsgIdBreakpoint
;
152
uint32_t
uiMsgIdStorage
;
154
uint32_t
uiMsgIdState
;
156
uint32_t
uiMsgIdWarning
;
158
uint32_t
uiMsgIdCPUStopped
;
159
}
166
MessageID_t
;
167
168
170
typedef
enum
WarningCodes
{
172
WAR_CLR_COMBINE
= 0,
174
WAR_CLR_BP_COMBINE
= 1,
176
WAR_MOD_COMBINE
= 2,
178
WAR_RESET
= 3,
180
WAR_DIS_TR_TRIGGER
= 4,
182
WAR_EN_TR_TRIGGER
= 5,
184
WAR_EEM_THREAD_ACTIVE
= 6,
186
WAR_EEM_CONFLICT
= 7
187
}
WarCode_t
;
188
189
191
typedef
enum
BpMode
{
193
BP_CLEAR
= 0,
195
BP_CODE
= 1,
197
BP_RANGE
= 2,
199
BP_COMPLEX
= 3,
201
BP_SOFTWARE
= 4
202
}
BpMode_t
;
203
204
206
typedef
enum
BpType
{
208
BP_MAB
= 0,
210
BP_MDB
= 1,
212
BP_REGISTER
= 2
213
}
BpType_t
;
214
244
typedef
enum
BpAccess
{
246
BP_FETCH
= 0,
248
BP_FETCH_HOLD
= 1,
250
BP_NO_FETCH
= 2,
252
BP_DONT_CARE
= 3,
254
BP_NO_FETCH_READ
= 4,
256
BP_NO_FETCH_WRITE
= 5,
258
BP_READ
= 6,
260
BP_WRITE
= 7,
262
BP_NO_FETCH_NO_DMA
= 8,
264
BP_DMA
= 9,
266
BP_NO_DMA
= 10,
268
BP_WRITE_NO_DMA
= 11,
270
BP_NO_FETCH_READ_NO_DMA
= 12,
272
BP_READ_NO_DMA
= 13,
274
BP_READ_DMA
= 14,
276
BP_WRITE_DMA
= 15,
278
BP_READ_WRITE
= 16
279
}
BpAccess_t
;
280
281
283
typedef
enum
BpAction
{
285
BP_NONE
= 0,
287
BP_BRK
= 1,
289
BP_STO
= 2,
291
BP_BRK_STO
= 3,
293
BP_CC
= 4
294
}
BpAction_t
;
295
296
301
typedef
enum
BpOperat
{
303
BP_EQUAL
= 0,
305
BP_GREATER
= 1,
307
BP_LOWER
= 2,
309
BP_UNEQUAL
= 3,
310
}
BpOperat_t
;
311
312
317
typedef
enum
BpRangeAction
{
319
BP_INSIDE
= 0,
321
BP_OUTSIDE
= 1,
322
}
BpRangeAction_t
;
323
324
329
typedef
enum
BpCondition
{
331
BP_NO_COND
= 0,
333
BP_COND
= 1,
334
}
BpCondition_t
;
335
340
typedef
enum
BpConditionValSize
{
341
BP_VALUE_SIZE_8_BIT
= 0,
342
BP_VALUE_SIZE_16_BIT
= 1,
343
BP_VALUE_SIZE_32_BIT
= 2
344
}
BpConditionValSize_t
;
345
350
typedef
struct
BREAKPOINT
{
352
BpMode_t
bpMode
;
354
int32_t
lAddrVal
;
356
BpType_t
bpType
;
358
int32_t
lReg
;
360
BpAccess_t
bpAccess
;
362
BpAction_t
bpAction
;
364
BpOperat_t
bpOperat
;
366
int32_t
lMask
;
368
int32_t
lRangeEndAdVa
;
370
BpRangeAction_t
bpRangeAction
;
372
BpCondition_t
bpCondition
;
374
uint32_t
lCondMdbVal
;
376
BpAccess_t
bpCondAccess
;
378
int32_t
lCondMask
;
380
BpOperat_t
bpCondOperat
;
382
uint16_t
wExtCombine
;
384
BpConditionValSize_t
bpCondValSize
;
385
}
392
BpParameter_t
;
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
{
412
TR_ENABLE
= 0,
414
TR_DISABLE
= 1,
416
TR_RESET
= 2,
417
}
TrControl_t
;
418
420
typedef
enum
TrMode
{
422
TR_HISTORY
= 0,
424
TR_FUTURE
= 1,
426
TR_SHOT
= 2,
428
TR_COLLECT
= 3,
429
}
TrMode_t
;
430
432
typedef
enum
TrAction
{
434
TR_FETCH
= 0,
436
TR_ALL_CYCLE
= 1,
437
}
TrAction_t
;
438
443
typedef
struct
TRACE_CTRL
{
445
TrControl_t
trControl
;
447
TrMode_t
trMode
;
449
TrAction_t
trAction
;
450
}
451
458
TrParameter_t
;
459
466
typedef
struct
TRACE_BUFFER
{
468
int32_t
lTrBufMAB
;
470
int32_t
lTrBufMDB
;
472
uint16_t
wTrBufCNTRL
;
473
}
474
480
TraceBuffer_t
;
481
482
483
484
486
typedef
enum
VwEnable
{
488
VW_ENABLE
= 0,
490
VW_DISABLE
= 1,
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
{
517
VwControl_t
vwControl
;
519
uint32_t
lAddr
;
521
VwDataType_t
vwDataType
;
522
}
528
VwParameter_t
;
529
530
535
typedef
struct
VAR_WATCH_RESOURCES
{
537
uint16_t
vwHandle
;
539
uint32_t
lAddr
;
541
VwDataType_t
vwDataType
;
542
}
548
VwResources_t
;
549
550
552
typedef
enum
CcControl
{
554
CC_DISABLE
= 0,
556
CC_ENABLE
= 1,
557
}
CcControl_t
;
558
560
typedef
enum
CcModule
{
562
CC_ALLRUN
= 0,
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
{
601
CC_STP_NONE
= 0,
603
CC_STP_ACLK
= (1 << 1),
605
CC_STP_SMCLK
= (1 << 2),
607
CC_STP_MCLK
= (1 << 3),
609
CC_STP_TACLK
= (1 << 5),
610
}
CcGeneralCLK_t
;
611
616
typedef
struct
CLOCK_CONTROL
{
618
CcControl_t
ccControl
;
620
uint16_t
ccModule
;
622
uint16_t
ccGeneralCLK
;
623
}
630
CcParameter_t
;
631
632
typedef
struct
CLOCK_CONTROL2
{
634
CcControl_t
ccControl
;
636
uint32_t
ccModule
;
638
uint16_t
ccGeneralCLK
;
639
}
646
CcParameter2_t
;
647
648
650
typedef
enum
SeqControl
{
652
SEQ_DISABLE
= 0,
654
SEQ_ENABLE
= 1,
655
}
SeqControl_t
;
656
658
typedef
enum
SeqState
{
660
SEQ_STATE0
= 0,
662
SEQ_STATE1
= 1,
664
SEQ_STATE2
= 2,
666
SEQ_STATE3
= 3,
667
}
SeqState_t
;
668
674
typedef
struct
SEQUENCER
{
676
SeqControl_t
seqControl
;
678
uint16_t
wHandleRstTrig
;
680
BpAction_t
bpAction
;
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
}
696
SeqParameter_t
;
697
698
700
typedef
enum
{
702
CYC_MODE_BASIC
= 0x0,
704
CYC_MODE_ADVANCED
= 0x1
705
}
CycleCounterMode_t
;
706
708
typedef
enum
{
710
CYC_COUNT_STOPPED
= 0x0,
712
CYC_COUNT_ON_REACTION
= 0x1,
714
CYC_COUNT_ON_IFCLK
= 0x2,
716
CYC_COUNT_ON_FETCH
= 0x4,
718
CYC_COUNT_ON_ALL_BUS
= 0x5,
720
CYC_COUNT_ON_CPU_BUS
= 0x6,
722
CYC_COUNT_ON_DMA_BUS
= 0x7
723
}
CycleCounterCountMode_t
;
724
726
typedef
enum
{
728
CYC_START_ON_RELEASE
= 0x0,
730
CYC_START_ON_REACTION
= 0x1,
732
CYC_START_ON_COUNTER
= 0x2,
734
CYC_START_IMMEDIATELY
= 0x3
735
}
CycleCounterStartMode_t
;
736
738
typedef
enum
739
{
741
CYC_STOP_ON_DBG_HALT
= 0x0,
743
CYC_STOP_ON_REACTION
= 0x1,
745
CYC_STOP_ON_COUNTER
= 0x2,
747
CYC_STOP_NO_EVENT
= 0x3
748
}
CycleCounterStopMode_t
;
749
751
typedef
enum
752
{
754
CYC_CLEAR_NO_EVENT
= 0x0,
756
CYC_CLEAR_ON_REACTION
= 0x1,
758
CYC_CLEAR_ON_COUNTER
= 0x2
759
}
CycleCounterClearMode_t
;
760
765
typedef
struct
766
{
768
CycleCounterCountMode_t
countMode
;
770
CycleCounterStartMode_t
startMode
;
772
CycleCounterStopMode_t
stopMode
;
774
CycleCounterClearMode_t
clearMode
;
775
}
780
CycleCounterConfig_t
;
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
1128
DLL430_SYMBOL
STATUS_T
WINAPI
MSP430_EEM_SetVariableWatch
(
VwEnable_t
VwEnable
);
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
1379
DLL430_SYMBOL
STATUS_T
WINAPI
MSP430_EEM_SetCycleCounterMode
(
CycleCounterMode_t
mode);
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
Generated on Wed Nov 30 2016 12:57:53 for MSP430 DLL API Documentation by
1.8.4