sysctl_a.h
Go to the documentation of this file.
1 #ifndef __SYSCTL_A_H__
2 #define __SYSCTL_A_H__
3 
4 //*****************************************************************************
5 //
8 //
9 //*****************************************************************************
10 
11 //*****************************************************************************
12 //
13 // If building with a C++ compiler, make all of the definitions in this header
14 // have a C binding.
15 //
16 //*****************************************************************************
17 #ifdef __cplusplus
18 extern "C"
19 {
20 #endif
21 
22 #include <stdint.h>
23 #include <stdbool.h>
24 #include <msp.h>
25 
26 //*****************************************************************************
27 //
28 // Control specific variables
29 //
30 //*****************************************************************************
31 #define SYSCTL_A_HARD_RESET 1
32 #define SYSCTL_A_SOFT_RESET 0
33 
34 #define SYSCTL_A_PERIPH_LCD SYSCTL_A_PERIHALT_CTL_HALT_LCD
35 #define SYSCTL_A_PERIPH_DMA SYSCTL_A_PERIHALT_CTL_HALT_DMA
36 #define SYSCTL_A_PERIPH_WDT SYSCTL_A_PERIHALT_CTL_HALT_WDT
37 #define SYSCTL_A_PERIPH_ADC SYSCTL_A_PERIHALT_CTL_HALT_ADC
38 #define SYSCTL_A_PERIPH_EUSCIB3 SYSCTL_A_PERIHALT_CTL_HALT_EUB3
39 #define SYSCTL_A_PERIPH_EUSCIB2 SYSCTL_A_PERIHALT_CTL_HALT_EUB2
40 #define SYSCTL_A_PERIPH_EUSCIB1 SYSCTL_A_PERIHALT_CTL_HALT_EUB1
41 #define SYSCTL_A_PERIPH_EUSCIB0 SYSCTL_A_PERIHALT_CTL_HALT_EUB0
42 #define SYSCTL_A_PERIPH_EUSCIA3 SYSCTL_A_PERIHALT_CTL_HALT_EUA3
43 #define SYSCTL_A_PERIPH_EUSCIA2 SYSCTL_A_PERIHALT_CTL_HALT_EUA2
44 #define SYSCTL_A_PERIPH_EUSCIA1 SYSCTL_A_PERIHALT_CTL_HALT_EUA1
45 #define SYSCTL_A_PERIPH_EUSCIA0 SYSCTL_A_PERIHALT_CTL_HALT_EUA0
46 #define SYSCTL_A_PERIPH_TIMER32_0_MODULE SYSCTL_A_PERIHALT_CTL_HALT_T32_0
47 #define SYSCTL_A_PERIPH_TIMER16_3 SYSCTL_A_PERIHALT_CTL_HALT_T16_3
48 #define SYSCTL_A_PERIPH_TIMER16_2 SYSCTL_A_PERIHALT_CTL_HALT_T16_2
49 #define SYSCTL_A_PERIPH_TIMER16_1 SYSCTL_A_PERIHALT_CTL_HALT_T16_1
50 #define SYSCTL_A_PERIPH_TIMER16_0 SYSCTL_A_PERIHALT_CTL_HALT_T16_0
51 
52 #define SYSCTL_A_NMIPIN_SRC SYSCTL_A_NMI_CTLSTAT_PIN_SRC
53 #define SYSCTL_A_PCM_SRC SYSCTL_A_NMI_CTLSTAT_PCM_SRC
54 #define SYSCTL_A_PSS_SRC SYSCTL_A_NMI_CTLSTAT_PSS_SRC
55 #define SYSCTL_A_CS_SRC SYSCTL_A_NMI_CTLSTAT_CS_SRC
56 
57 #define SYSCTL_A_REBOOT_KEY 0x6900
58 
59 #define SYSCTL_A_1_2V_REF (uint32_t)&TLV->ADC14_REF1P2V_TS30C - (uint32_t)TLV_BASE
60 #define SYSCTL_A_1_45V_REF (uint32_t)&TLV->ADC14_REF1P45V_TS30C - (uint32_t)TLV_BASE
61 #define SYSCTL_A_2_5V_REF (uint32_t)&TLV->ADC14_REF2P5V_TS30C - (uint32_t)TLV_BASE
62 
63 #define SYSCTL_A_85_DEGREES_C 4
64 #define SYSCTL_A_30_DEGREES_C 0
65 
66 #define SYSCTL_A_BANKMASK 0x80000000
67 #define SRAMCTL_CTL0_BANK 0x10000000
68 #define SRAMCTL_CTL1_BANK 0x20000000
69 #define SRAMCTL_CTL2_BANK 0x30000000
70 #define SRAMCTL_CTL3_BANK 0x40000000
71 
72 
73 #define TLV_START 0x00201004
74 #define TLV_TAG_RESERVED1 1
75 #define TLV_TAG_RESERVED2 2
76 #define TLV_TAG_CS 3
77 #define TLV_TAG_FLASHCTL 4
78 #define TLV_TAG_ADC14 5
79 #define TLV_TAG_RESERVED6 6
80 #define TLV_TAG_RESERVED7 7
81 #define TLV_TAG_REF 8
82 #define TLV_TAG_RESERVED9 9
83 #define TLV_TAG_RESERVED10 10
84 #define TLV_TAG_DEVINFO 11
85 #define TLV_TAG_DIEREC 12
86 #define TLV_TAG_RANDNUM 13
87 #define TLV_TAG_RESERVED14 14
88 #define TLV_TAG_BSL 15
89 #define TLV_TAGEND 0x0BD0E11D
90 
91 //*****************************************************************************
92 //
93 // Structures for TLV definitions
94 //
95 //*****************************************************************************
96 typedef struct
97 {
98  uint32_t maxProgramPulses;
99  uint32_t maxErasePulses;
101 
102 typedef struct
103 {
120 
122 
123 //*****************************************************************************
124 //
125 // Prototypes for the APIs.
126 //
127 //*****************************************************************************
128 
129 //*****************************************************************************
130 //
134 //
135 //*****************************************************************************
136 extern uint_least32_t SysCtl_A_getSRAMSize(void);
137 
138 //*****************************************************************************
139 //
147 //
148 //*****************************************************************************
149 extern uint_least32_t SysCtl_A_getFlashSize(void);
150 
151 //*****************************************************************************
152 //
160 //
161 //*****************************************************************************
162 extern uint_least32_t SysCtl_A_getInfoFlashSize(void);
163 
164 //*****************************************************************************
165 //
169 //
170 //*****************************************************************************
171 extern void SysCtl_A_rebootDevice(void);
172 
173 //*****************************************************************************
174 //
213 //
214 //*****************************************************************************
215 extern void SysCtl_A_getTLVInfo(uint_fast8_t tag, uint_fast8_t instance,
216  uint_fast8_t *length, uint32_t **data_address);
217 
218 //*****************************************************************************
219 //
237 //
238 //*****************************************************************************
239 extern bool SysCtl_A_enableSRAM(uint32_t addr);
240 
241 //*****************************************************************************
242 //
263 //
264 //*****************************************************************************
265 extern bool SysCtl_A_disableSRAM(uint32_t addr);
266 
267 //*****************************************************************************
268 //
287 //
288 //*****************************************************************************
289 extern bool SysCtl_A_enableSRAMRetention(uint32_t startAddr,
290  uint32_t endAddr);
291 
292 //*****************************************************************************
293 //
312 //
313 //*****************************************************************************
314 extern bool SysCtl_A_disableSRAMRetention(uint32_t startAddr,
315  uint32_t endAddr);
316 
317 //*****************************************************************************
318 //
345 //
346 //
347 //*****************************************************************************
348 extern void SysCtl_A_enablePeripheralAtCPUHalt(uint_fast16_t devices);
349 
350 //*****************************************************************************
351 //
380 //
381 //
382 //*****************************************************************************
383 extern void SysCtl_A_disablePeripheralAtCPUHalt(uint_fast16_t devices);
384 
385 //*****************************************************************************
386 //
396 //
397 //
398 //*****************************************************************************
399 extern void SysCtl_A_setWDTTimeoutResetType(uint_fast8_t resetType);
400 
401 //*****************************************************************************
402 //
413 //
414 //
415 //*****************************************************************************
416 extern void SysCtl_A_setWDTPasswordViolationResetType(uint_fast8_t resetType);
417 
418 //*****************************************************************************
419 //
430 //
431 //*****************************************************************************
432 extern void SysCtl_A_disableNMISource(uint_fast8_t flags);
433 
434 //*****************************************************************************
435 //
446 //
447 //*****************************************************************************
448 extern void SysCtl_A_enableNMISource(uint_fast8_t flags);
449 
450 //*****************************************************************************
451 //
455 //
456 //*****************************************************************************
457 extern uint_fast8_t SysCtl_A_getNMISourceStatus(void);
458 
459 //*****************************************************************************
460 //
465 //
466 //
467 //*****************************************************************************
468 extern void SysCtl_A_enableGlitchFilter(void);
469 
470 //*****************************************************************************
471 //
476 //
477 //
478 //*****************************************************************************
479 extern void SysCtl_A_disableGlitchFilter(void);
480 
481 //*****************************************************************************
482 //
501 //
502 //
503 //*****************************************************************************
504 extern uint_fast16_t SysCtl_A_getTempCalibrationConstant(uint32_t refVoltage,
505  uint32_t temperature);
506 
507 //*****************************************************************************
508 //
509 // Mark the end of the C bindings section for C++ compilers.
510 //
511 //*****************************************************************************
512 #ifdef __cplusplus
513 }
514 #endif
515 
516 //*****************************************************************************
517 //
518 // Close the Doxygen group.
520 //
521 //*****************************************************************************
522 
523 #endif // __SYSCTL_A_H__
bool SysCtl_A_disableSRAM(uint32_t addr)
Definition: sysctl_a.c:165
uint32_t rDCOER_FCAL_RSEL5
Definition: sysctl_a.h:113
void SysCtl_A_disableNMISource(uint_fast8_t flags)
Definition: sysctl_a.c:73
void SysCtl_A_setWDTTimeoutResetType(uint_fast8_t resetType)
Definition: sysctl_a.c:103
uint32_t rDCOER_MAXPOSTUNE_RSEL5
Definition: sysctl_a.h:116
uint_fast16_t SysCtl_A_getTempCalibrationConstant(uint32_t refVoltage, uint32_t temperature)
Definition: sysctl_a.c:129
uint_fast8_t SysCtl_A_getNMISourceStatus(void)
Definition: sysctl_a.c:83
void SysCtl_A_disablePeripheralAtCPUHalt(uint_fast16_t devices)
Definition: sysctl_a.c:98
uint_least32_t SysCtl_A_getInfoFlashSize(void)
Definition: sysctl_a.c:68
void SysCtl_A_rebootDevice(void)
Definition: sysctl_a.c:88
uint32_t rDCOER_CONSTK_RSEL04
Definition: sysctl_a.h:118
uint32_t rDCOIR_FCAL_RSEL5
Definition: sysctl_a.h:105
bool SysCtl_A_disableSRAMRetention(uint32_t startAddr, uint32_t endAddr)
Definition: sysctl_a.c:285
uint32_t rDCOIR_CONSTK_RSEL5
Definition: sysctl_a.h:111
uint32_t rDCOIR_MAXNEGTUNE_RSEL04
Definition: sysctl_a.h:107
void SysCtl_A_disableGlitchFilter(void)
Definition: sysctl_a.c:124
void SysCtl_A_getTLVInfo(uint_fast8_t tag, uint_fast8_t instance, uint_fast8_t *length, uint32_t **data_address)
Definition: sysctl_a.c:9
bool SysCtl_A_enableSRAMRetention(uint32_t startAddr, uint32_t endAddr)
Definition: sysctl_a.c:195
uint_least32_t SysCtl_A_getSRAMSize(void)
Definition: sysctl_a.c:58
uint32_t rDCOER_MAXNEGTUNE_RSEL04
Definition: sysctl_a.h:115
Definition: sysctl_a.h:96
uint32_t rDCOIR_CONSTK_RSEL04
Definition: sysctl_a.h:110
void SysCtl_A_enableGlitchFilter(void)
Definition: sysctl_a.c:119
void SysCtl_A_setWDTPasswordViolationResetType(uint_fast8_t resetType)
Definition: sysctl_a.c:111
uint32_t rDCOIR_FCAL_RSEL04
Definition: sysctl_a.h:104
uint32_t maxErasePulses
Definition: sysctl_a.h:99
uint32_t rDCOIR_MAXPOSTUNE_RSEL04
Definition: sysctl_a.h:106
uint32_t rDCOER_FCAL_RSEL04
Definition: sysctl_a.h:112
#define SysCtl_A_CSCalTLV_Info
Definition: cs.h:134
uint32_t rDCOIR_MAXNEGTUNE_RSEL5
Definition: sysctl_a.h:109
uint32_t rDCOER_MAXNEGTUNE_RSEL5
Definition: sysctl_a.h:117
void SysCtl_A_enablePeripheralAtCPUHalt(uint_fast16_t devices)
Definition: sysctl_a.c:93
uint32_t rDCOER_MAXPOSTUNE_RSEL04
Definition: sysctl_a.h:114
uint32_t rDCOER_CONSTK_RSEL5
Definition: sysctl_a.h:119
uint_least32_t SysCtl_A_getFlashSize(void)
Definition: sysctl_a.c:63
uint32_t rDCOIR_MAXPOSTUNE_RSEL5
Definition: sysctl_a.h:108
uint32_t maxProgramPulses
Definition: sysctl_a.h:98
bool SysCtl_A_enableSRAM(uint32_t addr)
Definition: sysctl_a.c:135
void SysCtl_A_enableNMISource(uint_fast8_t flags)
Definition: sysctl_a.c:78

Copyright 2016, Texas Instruments Incorporated