61 #ifndef BSP430_PERIPH_CS4_H
62 #define BSP430_PERIPH_CS4_H
73 #define BSP430_MODULE_CS4 (BSP430_PERIPH_CS_IS_CS4 - 0)
75 #if defined(BSP430_DOXYGEN) || (BSP430_MODULE_CS4 - 0)
86 #ifndef BSP430_CS4_FLL_SELREF
87 #define BSP430_CS4_FLL_SELREF SELREF__XT1CLK
91 #define BSP430_CS4_DCO_IS_FAULTED_NI() (CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1))
99 #define BSP430_CS4_LFXT1_IS_FAULTED_NI() (CSCTL7 & XT1OFFG)
108 #define BSP430_CS4_XT2_IS_FAULTED_NI() 0
125 #define BSP430_CLOCK_LFXT1_IS_FAULTED_NI() BSP430_CS4_LFXT1_IS_FAULTED_NI()
131 #define BSP430_CLOCK_XT2_IS_FAULTED_NI() (1)
134 #define BSP430_CS4_CLEAR_FAULTS_NI() do { \
135 CSCTL7 &= ~(FLLUNLOCKHIS0 | FLLUNLOCKHIS1 | FLLULIFG | XT1OFFG | DCOFFG); \
144 #if defined(BSP430_DOXYGEN) || ! defined(BSP430_CLOCK_CLEAR_FAULTS_NI)
145 #define BSP430_CLOCK_CLEAR_FAULTS_NI() do { \
146 BSP430_CS4_CLEAR_FAULTS_NI(); \
147 BSP430_CLOCK_OSC_CLEAR_FAULT_NI(); \
152 #define BSP430_CLOCK_NOMINAL_VLOCLK_HZ 10000U
155 #define BSP430_CLOCK_PUC_MCLK_HZ 1048576UL
160 #define BSP430_CS4_NOMINAL_XT1CLK_HZ 32768U
165 #define BSP430_CS4_NOMINAL_REFOCLK_HZ 32768U
173 #ifndef BSP430_CS4_NOMINAL_MODCLK_HZ
174 #define BSP430_CS4_NOMINAL_MODCLK_HZ 5000000UL
179 #define BSP430_NOMINAL_MODCLK_HZ BSP430_CS4_NOMINAL_MODCLK_HZ
Clock-related functions implemented on all MSP430 MCUs.
Generic peripheral support for MSP430 MCUs.