75 #ifndef BSP430_PERIPH_BC2_H
76 #define BSP430_PERIPH_BC2_H
87 #define BSP430_MODULE_BC2 defined(__MSP430_HAS_BC2__)
89 #if defined(BSP430_DOXYGEN) || (BSP430_MODULE_BC2 - 0)
108 #ifndef configBSP430_BC2_TRIM_TO_MCLK
109 #define configBSP430_BC2_TRIM_TO_MCLK 0
112 #if (configBSP430_BC2_TRIM_TO_MCLK - 0) && ! (configBSP430_TIMER_CCACLK - 0)
113 #warning configBSP430_BC2_TRIM_TO_MCLK requested without configBSP430_TIMER_CCACLK
125 #if defined(BSP430_DOXYGEN)
126 #define BSP430_BC2_TRIM_TO_MCLK include <bsp430/platform.h>
129 #if defined(BSP430_DOXYGEN) || (configBSP430_BC2_TRIM_TO_MCLK - 0)
161 #define BSP430_BC2_XT2OF_ XT2OF
163 #define BSP430_BC2_XT2OF_ 0
166 #define BSP430_BC2_LFXT1OF_ LFXT1OF
168 #define BSP430_BC2_LFXT1OF_ 0
184 #define BSP430_BC2_LFXT1_IS_FAULTED_NI() (BCSCTL3 & BSP430_BC2_LFXT1OF_)
199 #define BSP430_BC2_XT2_IS_FAULTED_NI() (BC2CTL3 & BSP430_BC2_XT2OF_)
219 #if defined(BSP430_DOXYGEN) || ! defined(BSP430_CLOCK_LFXT1_IS_FAULTED_NI)
220 #define BSP430_CLOCK_LFXT1_IS_FAULTED_NI() ((BCSCTL3 & (LFXT1S0 | LFXT1S1)) || BSP430_BC2_LFXT1_IS_FAULTED_NI())
238 #if defined(BSP430_DOXYGEN) || ! defined(BSP430_CLOCK_XT2_IS_FAULTED_NI)
239 #define BSP430_CLOCK_XT2_IS_FAULTED_NI() ((BCSCTL1 & XT2OFF) || BSP430_BC2_XT2_IS_FAULTED_NI())
248 #if defined(BSP430_DOXYGEN) || ! defined(BSP430_CLOCK_CLEAR_FAULTS_NI)
249 #define BSP430_CLOCK_CLEAR_FAULTS_NI() do { \
250 BSP430_CLOCK_OSC_CLEAR_FAULT_NI(); \
254 #ifndef BSP430_CLOCK_LFXT1_XCAP
256 #define BSP430_CLOCK_LFXT1_XCAP XCAP_1
260 #define BSP430_CLOCK_NOMINAL_VLOCLK_HZ 12000U
263 #define BSP430_CLOCK_PUC_MCLK_HZ 1100000UL
int iBSP430bc2TrimToMCLK_ni(unsigned long mclk_Hz)
Clock-related functions implemented on all MSP430 MCUs.
Generic peripheral support for MSP430 MCUs.