sysctl.h
Go to the documentation of this file.
1 #ifndef __SYSCTL_H__
2 #define __SYSCTL_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 "register_remap.h"
24 #include <msp432.h>
25 
26 //*****************************************************************************
27 //
28 // Control specific variables
29 //
30 //*****************************************************************************
31 #define SYSCTL_SRAM_BANK7 SYSCTL_SRAM_BANKEN_BNK7_EN
32 #define SYSCTL_SRAM_BANK6_TO_7 SYSCTL_SRAM_BANKEN_BNK6_EN
33 #define SYSCTL_SRAM_BANK5_TO_7 SYSCTL_SRAM_BANKEN_BNK5_EN
34 #define SYSCTL_SRAM_BANK4_TO_7 SYSCTL_SRAM_BANKEN_BNK4_EN
35 #define SYSCTL_SRAM_BANK3_TO_7 SYSCTL_SRAM_BANKEN_BNK3_EN
36 #define SYSCTL_SRAM_BANK2_TO_7 SYSCTL_SRAM_BANKEN_BNK2_EN
37 #define SYSCTL_SRAM_BANK1_TO_7 SYSCTL_SRAM_BANKEN_BNK1_EN
38 
39 #define SYSCTL_HARD_RESET 1
40 #define SYSCTL_SOFT_RESET 0
41 
42 #define SYSCTL_PERIPH_DMA SYSCTL_PERI_HALTCTL_DMA
43 #define SYSCTL_PERIPH_WDT SYSCTL_PERI_HALTCTL_WDT
44 #define SYSCTL_PERIPH_ADC SYSCTL_PERI_HALTCTL_ADC
45 #define SYSCTL_PERIPH_EUSCIB3 SYSCTL_PERI_HALTCTL_EUB3
46 #define SYSCTL_PERIPH_EUSCIB2 SYSCTL_PERI_HALTCTL_EUB2
47 #define SYSCTL_PERIPH_EUSCIB1 SYSCTL_PERI_HALTCTL_EUB1
48 #define SYSCTL_PERIPH_EUSCIB0 SYSCTL_PERI_HALTCTL_EUB0
49 #define SYSCTL_PERIPH_EUSCIA3 SYSCTL_PERI_HALTCTL_EUA3
50 #define SYSCTL_PERIPH_EUSCIA2 SYSCTL_PERI_HALTCTL_EUA2
51 #define SYSCTL_PERIPH_EUSCIA1 SYSCTL_PERI_HALTCTL_EUA1
52 #define SYSCTL_PERIPH_EUSCIA0 SYSCTL_PERI_HALTCTL_EUA0
53 #define SYSCTL_PERIPH_TIMER32_0_MODULE SYSCTL_PERI_HALTCTL_T32_0
54 #define SYSCTL_PERIPH_TIMER16_3 SYSCTL_PERI_HALTCTL_T16_3
55 #define SYSCTL_PERIPH_TIMER16_2 SYSCTL_PERI_HALTCTL_T16_2
56 #define SYSCTL_PERIPH_TIMER16_1 SYSCTL_PERI_HALTCTL_T16_1
57 #define SYSCTL_PERIPH_TIMER16_0 SYSCTL_PERI_HALTCTL_T16_0
58 
59 #define SYSCTL_NMIPIN_SRC SYSCTL_NMI_CTLSTAT_PIN_SRC
60 #define SYSCTL_PCM_SRC SYSCTL_NMI_CTLSTAT_PCM_SRC
61 #define SYSCTL_PSS_SRC SYSCTL_NMI_CTLSTAT_PSS_SRC
62 #define SYSCTL_CS_SRC SYSCTL_NMI_CTLSTAT_CS_SRC
63 
64 #define SYSCTL_REBOOT_KEY 0x6900
65 
66 #define SYSCTL_1_2V_REF OFS_DDDS_ADC14_REFTEMP0
67 #define SYSCTL_1_45V_REF OFS_DDDS_ADC14_REFTEMP1
68 #define SYSCTL_2V_REF OFS_DDDS_ADC14_REFTEMP2
69 #define SYSCTL_2_5V_REF OFS_DDDS_ADC14_REFTEMP3
70 
71 #define SYSCTL_85_DEGREES_C 0
72 #define SYSCTL_30_DEGREES_C 16
73 
74 //*****************************************************************************
75 //
76 // Prototypes for the APIs.
77 //
78 //*****************************************************************************
79 
80 //*****************************************************************************
81 //
85 //
86 //*****************************************************************************
87 extern uint_least32_t SysCtl_getSRAMSize(void);
88 
89 //*****************************************************************************
90 //
94 //
95 //*****************************************************************************
96 extern uint_least32_t SysCtl_getFlashSize(void);
97 
98 //*****************************************************************************
99 //
103 //
104 //*****************************************************************************
105 extern void SysCtl_rebootDevice(void);
106 
107 //*****************************************************************************
108 //
129 //
130 //*****************************************************************************
131 extern void SysCtl_enableSRAMBank(uint_fast8_t sramBank);
132 
133 //*****************************************************************************
134 //
154 //
155 //*****************************************************************************
156 extern void SysCtl_disableSRAMBank(uint_fast8_t sramBank);
157 
158 //*****************************************************************************
159 //
180 //
181 //*****************************************************************************
182 extern void SysCtl_enableSRAMBankRetention(uint_fast8_t sramBank);
183 
184 //*****************************************************************************
185 //
205 //
206 //
207 //*****************************************************************************
208 extern void SysCtl_disableSRAMBankRetention(uint_fast8_t sramBank);
209 
210 //*****************************************************************************
211 //
237 //
238 //
239 //*****************************************************************************
240 extern void SysCtl_enablePeripheralAtCPUHalt(uint_fast16_t devices);
241 
242 //*****************************************************************************
243 //
271 //
272 //
273 //*****************************************************************************
274 extern void SysCtl_disablePeripheralAtCPUHalt(uint_fast16_t devices);
275 
276 //*****************************************************************************
277 //
287 //
288 //
289 //*****************************************************************************
290 extern void SysCtl_setWDTTimeoutResetType(uint_fast8_t resetType);
291 
292 //*****************************************************************************
293 //
304 //
305 //
306 //*****************************************************************************
307 extern void SysCtl_setWDTPasswordViolationResetType(uint_fast8_t resetType);
308 
309 //*****************************************************************************
310 //
321 //
322 //*****************************************************************************
323 extern void SysCtl_disableNMISource(uint_fast8_t flags);
324 
325 //*****************************************************************************
326 //
337 //
338 //*****************************************************************************
339 extern void SysCtl_enableNMISource(uint_fast8_t flags);
340 
341 //*****************************************************************************
342 //
346 //
347 //*****************************************************************************
348 extern uint_fast8_t SysCtl_getNMISourceStatus(void);
349 
350 //*****************************************************************************
351 //
356 //
357 //
358 //*****************************************************************************
359 extern void SysCtl_enableGlitchFilter(void);
360 
361 //*****************************************************************************
362 //
367 //
368 //
369 //*****************************************************************************
370 extern void SysCtl_disableGlitchFilter(void);
371 
372 //*****************************************************************************
373 //
393 //
394 //
395 //*****************************************************************************
396 extern uint_fast16_t SysCtl_getTempCalibrationConstant(uint32_t refVoltage,
397  uint32_t temperature);
398 
399 //*****************************************************************************
400 //
401 // Mark the end of the C bindings section for C++ compilers.
402 //
403 //*****************************************************************************
404 #ifdef __cplusplus
405 }
406 #endif
407 
408 //*****************************************************************************
409 //
410 // Close the Doxygen group.
412 //
413 //*****************************************************************************
414 
415 #endif // __SYSCTL_H__
void SysCtl_enableSRAMBankRetention(uint_fast8_t sramBank)
Definition: sysctl.c:125
uint_fast16_t SysCtl_getTempCalibrationConstant(uint32_t refVoltage, uint32_t temperature)
Definition: sysctl.c:194
uint_fast8_t SysCtl_getNMISourceStatus(void)
Definition: sysctl.c:71
void SysCtl_disableGlitchFilter(void)
Definition: sysctl.c:189
void SysCtl_enableGlitchFilter(void)
Definition: sysctl.c:184
uint_least32_t SysCtl_getFlashSize(void)
Definition: sysctl.c:56
void SysCtl_setWDTPasswordViolationResetType(uint_fast8_t resetType)
Definition: sysctl.c:173
uint_least32_t SysCtl_getSRAMSize(void)
Definition: sysctl.c:51
void SysCtl_disableSRAMBankRetention(uint_fast8_t sramBank)
Definition: sysctl.c:136
void SysCtl_setWDTTimeoutResetType(uint_fast8_t resetType)
Definition: sysctl.c:164
void SysCtl_disableSRAMBank(uint_fast8_t sramBank)
Definition: sysctl.c:87
void SysCtl_disableNMISource(uint_fast8_t flags)
Definition: sysctl.c:61
void SysCtl_enablePeripheralAtCPUHalt(uint_fast16_t devices)
Definition: sysctl.c:152
void SysCtl_disablePeripheralAtCPUHalt(uint_fast16_t devices)
Definition: sysctl.c:158
void SysCtl_rebootDevice(void)
Definition: sysctl.c:147
void SysCtl_enableNMISource(uint_fast8_t flags)
Definition: sysctl.c:66
void SysCtl_enableSRAMBank(uint_fast8_t sramBank)
Definition: sysctl.c:76

Copyright 2014, Texas Instruments Incorporated