MSP430 DriverLib for MSP430FR57xx Devices  2.91.13.01
cs.h
1 //*****************************************************************************
2 //
3 // cs.h - Driver for the CS Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_CS_H__
8 #define __MSP430WARE_CS_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_CS__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // The following are values that can be passed to the clockSourceDivider
28 // parameter for functions: CS_initClockSignal().
29 //
30 //*****************************************************************************
31 #define CS_CLOCK_DIVIDER_1 DIVM__1
32 #define CS_CLOCK_DIVIDER_2 DIVM__2
33 #define CS_CLOCK_DIVIDER_4 DIVM__4
34 #define CS_CLOCK_DIVIDER_8 DIVM__8
35 #define CS_CLOCK_DIVIDER_16 DIVM__16
36 #define CS_CLOCK_DIVIDER_32 DIVM__32
37 
38 //*****************************************************************************
39 //
40 // The following are values that can be passed to the selectClock parameter for
41 // functions: CS_enableClockRequest(), and CS_disableClockRequest(); the
42 // selectedClockSignal parameter for functions: CS_initClockSignal().
43 //
44 //*****************************************************************************
45 #define CS_ACLK 0x01
46 #define CS_MCLK 0x02
47 #define CS_SMCLK 0x04
48 #define CS_MODOSC MODCLKREQEN
49 
50 //*****************************************************************************
51 //
52 // The following are values that can be passed to the clockSource parameter for
53 // functions: CS_initClockSignal().
54 //
55 //*****************************************************************************
56 #define CS_XT1CLK_SELECT SELM__XT1CLK
57 #define CS_VLOCLK_SELECT SELM__VLOCLK
58 #define CS_DCOCLK_SELECT SELM__DCOCLK
59 #define CS_XT2CLK_SELECT SELM__XT2CLK
60 
61 //*****************************************************************************
62 //
63 // The following are values that can be passed to the xt1drive parameter for
64 // functions: CS_turnOnXT1(), and CS_turnOnXT1WithTimeout().
65 //
66 //*****************************************************************************
67 #define CS_XT1_DRIVE_0 XT1DRIVE_0
68 #define CS_XT1_DRIVE_1 XT1DRIVE_1
69 #define CS_XT1_DRIVE_2 XT1DRIVE_2
70 #define CS_XT1_DRIVE_3 XT1DRIVE_3
71 
72 //*****************************************************************************
73 //
74 // The following are values that can be passed to the xt2drive parameter for
75 // functions: CS_turnOnXT2(), and CS_turnOnXT2WithTimeout().
76 //
77 //*****************************************************************************
78 #define CS_XT2_DRIVE_4MHZ_8MHZ XT2DRIVE_0
79 #define CS_XT2_DRIVE_8MHZ_16MHZ XT2DRIVE_1
80 #define CS_XT2_DRIVE_16MHZ_24MHZ XT2DRIVE_2
81 #define CS_XT2_DRIVE_24MHZ_32MHZ XT2DRIVE_3
82 
83 //*****************************************************************************
84 //
85 // The following are values that can be passed to the mask parameter for
86 // functions: CS_getFaultFlagStatus(), and CS_clearFaultFlag() as well as
87 // returned by the CS_getFaultFlagStatus() function.
88 //
89 //*****************************************************************************
90 #define CS_XT2OFFG XT2OFFG
91 #define CS_XT1OFFG XT1OFFG
92 
93 //*****************************************************************************
94 //
95 // The following are values that can be passed to the dcorsel parameter for
96 // functions: CS_setDCOFreq().
97 //
98 //*****************************************************************************
99 #define CS_DCORSEL_0 DCOFSEL_0
100 #define CS_DCORSEL_1 DCORSEL
101 
102 //*****************************************************************************
103 //
104 // The following are values that can be passed to the dcofsel parameter for
105 // functions: CS_setDCOFreq().
106 //
107 //*****************************************************************************
108 #define CS_DCOFSEL_0 DCOFSEL_0
109 #define CS_DCOFSEL_1 DCOFSEL_1
110 #define CS_DCOFSEL_2 DCOFSEL_2
111 #define CS_DCOFSEL_3 DCOFSEL_3
112 
113 //*****************************************************************************
114 //
115 // Prototypes for the APIs.
116 //
117 //*****************************************************************************
118 
119 //*****************************************************************************
120 //
121 //! \brief Sets the external clock source
122 //!
123 //! This function sets the external clock sources XT1 and XT2 crystal
124 //! oscillator frequency values. This function must be called if an external
125 //! crystal XT1 or XT2 is used and the user intends to call CS_getMCLK,
126 //! CS_getSMCLK, CS_getACLK and turnOnXT1, XT1ByPass, turnOnXT1WithTimeout,
127 //! XT1ByPassWithTimeout.
128 //!
129 //! \param XT1CLK_frequency is the XT1 crystal frequencies in Hz
130 //! \param XT2CLK_frequency is the XT2 crystal frequencies in Hz
131 //!
132 //! \return None
133 //
134 //*****************************************************************************
135 extern void CS_setExternalClockSource(uint32_t XT1CLK_frequency,
136  uint32_t XT2CLK_frequency);
137 
138 //*****************************************************************************
139 //
140 //! \brief Initializes clock signal
141 //!
142 //! This function initializes each of the clock signals. The user must ensure
143 //! that this function is called for each clock signal. If not, the default
144 //! state is assumed for the particular clock signal. Refer to MSP430ware
145 //! documentation for CS module or Device Family User's Guide for details of
146 //! default clock signal states.
147 //!
148 //! \param selectedClockSignal is the selected clock signal
149 //! Valid values are:
150 //! - \b CS_ACLK
151 //! - \b CS_MCLK
152 //! - \b CS_SMCLK
153 //! - \b CS_MODOSC
154 //! \param clockSource is Clock source for the selectedClock
155 //! Valid values are:
156 //! - \b CS_XT1CLK_SELECT
157 //! - \b CS_VLOCLK_SELECT
158 //! - \b CS_DCOCLK_SELECT
159 //! - \b CS_XT2CLK_SELECT
160 //! \param clockSourceDivider selects the clock divider to calculate clock
161 //! signal from clock source.
162 //! Valid values are:
163 //! - \b CS_CLOCK_DIVIDER_1 - [Default for ACLK]
164 //! - \b CS_CLOCK_DIVIDER_2
165 //! - \b CS_CLOCK_DIVIDER_4
166 //! - \b CS_CLOCK_DIVIDER_8 - [Default for SMCLK and MCLK]
167 //! - \b CS_CLOCK_DIVIDER_16
168 //! - \b CS_CLOCK_DIVIDER_32
169 //!
170 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL3 register and bits of
171 //! \b CSCTL2 register.
172 //!
173 //! \return None
174 //
175 //*****************************************************************************
176 extern void CS_initClockSignal(uint8_t selectedClockSignal,
177  uint16_t clockSource,
178  uint16_t clockSourceDivider);
179 
180 //*****************************************************************************
181 //
182 //! \brief Initializes the XT1 crystal oscillator in low frequency mode.
183 //!
184 //! Loops until all oscillator fault flags are cleared, with no timeout. See
185 //! the device-specific data sheet for appropriate drive settings. IMPORTANT:
186 //! User must call CS_setExternalClockSource function to set frequency of
187 //! external clocks before calling this function.
188 //!
189 //! \param xt1drive is the target drive strength for the XT1 crystal
190 //! oscillator.
191 //! Valid values are:
192 //! - \b CS_XT1_DRIVE_0
193 //! - \b CS_XT1_DRIVE_1
194 //! - \b CS_XT1_DRIVE_2
195 //! - \b CS_XT1_DRIVE_3 [Default]
196 //!
197 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
198 //! CSCTL4 register and bits of \b SFRIFG1 register.
199 //!
200 //! \return None
201 //
202 //*****************************************************************************
203 extern void CS_turnOnXT1(uint16_t xt1drive);
204 
205 //*****************************************************************************
206 //
207 //! \brief Turn on SMCLK
208 //!
209 //!
210 //! Modified bits of \b CSCTL4 register.
211 //!
212 //! \return None
213 //
214 //*****************************************************************************
215 extern void CS_turnOnSMCLK(void);
216 
217 //*****************************************************************************
218 //
219 //! \brief Turn off SMCLK
220 //!
221 //!
222 //! Modified bits of \b CSCTL4 register.
223 //!
224 //! \return None
225 //
226 //*****************************************************************************
227 extern void CS_turnOffSMCLK(void);
228 
229 //*****************************************************************************
230 //
231 //! \brief Bypasses the XT1 crystal oscillator.
232 //!
233 //! Loops until all oscillator fault flags are cleared, with no timeout.
234 //! IMPORTANT: User must call CS_setExternalClockSource function to set
235 //! frequency of external clocks before calling this function.
236 //!
237 //!
238 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
239 //! CSCTL4 register and bits of \b SFRIFG register.
240 //!
241 //! \return None
242 //
243 //*****************************************************************************
244 extern void CS_bypassXT1(void);
245 
246 //*****************************************************************************
247 //
248 //! \brief Initializes the XT1 crystal oscillator in low frequency mode with
249 //! timeout.
250 //!
251 //! Loops until all oscillator fault flags are cleared or until a timeout
252 //! counter is decremented and equals to zero. See the device-specific
253 //! datasheet for appropriate drive settings. IMPORTANT: User must call
254 //! CS_setExternalClockSource function to set frequency of external clocks
255 //! before calling this function.
256 //!
257 //! \param xt1drive is the target drive strength for the XT1 crystal
258 //! oscillator.
259 //! Valid values are:
260 //! - \b CS_XT1_DRIVE_0
261 //! - \b CS_XT1_DRIVE_1
262 //! - \b CS_XT1_DRIVE_2
263 //! - \b CS_XT1_DRIVE_3 [Default]
264 //! \param timeout is the count value that gets decremented every time the loop
265 //! that clears oscillator fault flags gets executed.
266 //!
267 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
268 //! CSCTL4 register and bits of \b SFRIFG1 register.
269 //!
270 //! \return STATUS_SUCCESS or STATUS_FAIL
271 //
272 //*****************************************************************************
273 extern bool CS_turnOnXT1WithTimeout(uint16_t xt1drive,
274  uint32_t timeout);
275 
276 //*****************************************************************************
277 //
278 //! \brief Bypasses the XT1 crystal oscillator with timeout.
279 //!
280 //! Loops until all oscillator fault flags are cleared or until a timeout
281 //! counter is decremented and equals to zero.IMPORTANT: User must call
282 //! CS_setExternalClockSource to set frequency of external clocks before
283 //! calling this function
284 //!
285 //! \param timeout is the count value that gets decremented every time the loop
286 //! that clears oscillator fault flags gets executed.
287 //!
288 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
289 //! CSCTL4 register and bits of \b SFRIFG register.
290 //!
291 //! \return STATUS_SUCCESS or STATUS_FAIL
292 //
293 //*****************************************************************************
294 extern bool CS_bypassXT1WithTimeout(uint32_t timeout);
295 
296 //*****************************************************************************
297 //
298 //! \brief Stops the XT1 oscillator using the XT1OFF bit.
299 //!
300 //!
301 //! Modified bits of \b CSCTL4 register.
302 //!
303 //! \return None
304 //
305 //*****************************************************************************
306 extern void CS_turnOffXT1(void);
307 
308 //*****************************************************************************
309 //
310 //! \brief Starts the XT2 crystal
311 //!
312 //! Initializes the XT2 crystal oscillator, which supports crystal frequencies
313 //! between 4 MHz and 32 MHz, depending on the selected drive strength. Loops
314 //! until all oscillator fault flags are cleared, with no timeout. See the
315 //! device-specific data sheet for appropriate drive settings. NOTE: User must
316 //! call CS_setExternalClockSource to set frequency of external clocks before
317 //! calling this function.
318 //!
319 //! \param xt2drive is the target drive strength for the XT2 crystal
320 //! oscillator.
321 //! Valid values are:
322 //! - \b CS_XT2_DRIVE_4MHZ_8MHZ
323 //! - \b CS_XT2_DRIVE_8MHZ_16MHZ
324 //! - \b CS_XT2_DRIVE_16MHZ_24MHZ
325 //! - \b CS_XT2_DRIVE_24MHZ_32MHZ [Default]
326 //!
327 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
328 //! CSCTL4 register and bits of \b SFRIFG1 register.
329 //!
330 //! \return None
331 //
332 //*****************************************************************************
333 extern void CS_turnOnXT2(uint16_t xt2drive);
334 
335 //*****************************************************************************
336 //
337 //! \brief Bypasses the XT2 crystal oscillator
338 //!
339 //! Bypasses the XT2 crystal oscillator which supports crystal frequencies
340 //! between 4 MHz and 32 MHz. Loops until all oscillator fault flags are
341 //! cleared, with no timeout. NOTE: User must call CS_setExternalClockSource to
342 //! set frequency of external clocks before calling this function.
343 //!
344 //!
345 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
346 //! \b SFRIFG register.
347 //!
348 //! \return None
349 //
350 //*****************************************************************************
351 extern void CS_bypassXT2(void);
352 
353 //*****************************************************************************
354 //
355 //! \brief Initializes the XT2 crystal oscillator with timeout
356 //!
357 //! Initializes the XT2 crystal oscillator, which supports crystal frequencies
358 //! between 4 MHz and 32 MHz, depending on the selected drive strength. Loops
359 //! until all oscillator fault flags are cleared or until a timeout counter is
360 //! decremented and equals to zero. See the device-specific data sheet for
361 //! appropriate drive settings. NOTE: User must call CS_setExternalClockSource
362 //! to set frequency of external clocks before calling this function.
363 //!
364 //! \param xt2drive is the target drive strength for the XT2 crystal
365 //! oscillator.
366 //! Valid values are:
367 //! - \b CS_XT2_DRIVE_4MHZ_8MHZ
368 //! - \b CS_XT2_DRIVE_8MHZ_16MHZ
369 //! - \b CS_XT2_DRIVE_16MHZ_24MHZ
370 //! - \b CS_XT2_DRIVE_24MHZ_32MHZ [Default]
371 //! \param timeout is the count value that gets decremented every time the loop
372 //! that clears oscillator fault flags gets executed.
373 //!
374 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
375 //! \b SFRIFG1 register.
376 //!
377 //! \return STATUS_SUCCESS or STATUS_FAIL
378 //
379 //*****************************************************************************
380 extern bool CS_turnOnXT2WithTimeout(uint16_t xt2drive,
381  uint32_t timeout);
382 
383 //*****************************************************************************
384 //
385 //! \brief Bypasses the XT2 crystal oscillator with timeout
386 //!
387 //! Bypasses the XT2 crystal oscillator with timeout, which supports crystal
388 //! frequencies between 4 MHz and 32 MHz. Loops until all oscillator fault
389 //! flags are cleared or until a timeout counter is decremented and equals to
390 //! zero. NOTE: User must call CS_setExternalClockSource to set frequency of
391 //! external clocks before calling this function.
392 //!
393 //! \param timeout is the count value that gets decremented every time the loop
394 //! that clears oscillator fault flags gets executed.
395 //!
396 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
397 //! \b SFRIFG1 register.
398 //!
399 //! \return STATUS_SUCCESS or STATUS_FAIL
400 //
401 //*****************************************************************************
402 extern bool CS_bypassXT2WithTimeout(uint32_t timeout);
403 
404 //*****************************************************************************
405 //
406 //! \brief Stops the XT2 oscillator using the XT2OFF bit.
407 //!
408 //!
409 //! Modified bits of \b CSCTL4 register.
410 //!
411 //! \return None
412 //
413 //*****************************************************************************
414 extern void CS_turnOffXT2(void);
415 
416 //*****************************************************************************
417 //
418 //! \brief Enables conditional module requests
419 //!
420 //! \param selectClock selects specific request enables.
421 //! Valid values are:
422 //! - \b CS_ACLK
423 //! - \b CS_MCLK
424 //! - \b CS_SMCLK
425 //! - \b CS_MODOSC
426 //!
427 //! Modified bits of \b CSCTL6 register.
428 //!
429 //! \return None
430 //
431 //*****************************************************************************
432 extern void CS_enableClockRequest(uint8_t selectClock);
433 
434 //*****************************************************************************
435 //
436 //! \brief Disables conditional module requests
437 //!
438 //! \param selectClock selects specific request enables.
439 //! Valid values are:
440 //! - \b CS_ACLK
441 //! - \b CS_MCLK
442 //! - \b CS_SMCLK
443 //! - \b CS_MODOSC
444 //!
445 //! Modified bits of \b CSCTL6 register.
446 //!
447 //! \return None
448 //
449 //*****************************************************************************
450 extern void CS_disableClockRequest(uint8_t selectClock);
451 
452 //*****************************************************************************
453 //
454 //! \brief Gets the current CS fault flag status.
455 //!
456 //! \param mask is the masked interrupt flag status to be returned.
457 //! Mask value is the logical OR of any of the following:
458 //! - \b CS_XT2OFFG - XT2 oscillator fault flag
459 //! - \b CS_XT1OFFG - XT2 oscillator fault flag (HF mode)
460 //!
461 //! \return Logical OR of any of the following:
462 //! - \b CS_XT2OFFG XT2 oscillator fault flag
463 //! - \b CS_XT1OFFG XT2 oscillator fault flag (HF mode)
464 //! \n indicating the status of the masked interrupts
465 //
466 //*****************************************************************************
467 extern uint8_t CS_getFaultFlagStatus(uint8_t mask);
468 
469 //*****************************************************************************
470 //
471 //! \brief Clears the current CS fault flag status for the masked bit.
472 //!
473 //! \param mask is the masked interrupt flag status to be returned.
474 //! Mask value is the logical OR of any of the following:
475 //! - \b CS_XT2OFFG - XT2 oscillator fault flag
476 //! - \b CS_XT1OFFG - XT2 oscillator fault flag (HF mode)
477 //!
478 //! Modified bits of \b CSCTL5 register.
479 //!
480 //! \return None
481 //
482 //*****************************************************************************
483 extern void CS_clearFaultFlag(uint8_t mask);
484 
485 //*****************************************************************************
486 //
487 //! \brief Get the current ACLK frequency.
488 //!
489 //! If a oscillator fault is set, the frequency returned will be based on the
490 //! fail safe mechanism of CS module. The user of this API must ensure that
491 //! CS_externalClockSourceInit API was invoked before in case XT1 or XT2 is
492 //! being used.
493 //!
494 //!
495 //! \return Current ACLK frequency in Hz
496 //
497 //*****************************************************************************
498 extern uint32_t CS_getACLK(void);
499 
500 //*****************************************************************************
501 //
502 //! \brief Get the current SMCLK frequency.
503 //!
504 //! If a oscillator fault is set, the frequency returned will be based on the
505 //! fail safe mechanism of CS module. The user of this API must ensure that
506 //! CS_externalClockSourceInit API was invoked before in case XT1 or XT2 is
507 //! being used.
508 //!
509 //!
510 //! \return Current SMCLK frequency in Hz
511 //
512 //*****************************************************************************
513 extern uint32_t CS_getSMCLK(void);
514 
515 //*****************************************************************************
516 //
517 //! \brief Get the current MCLK frequency.
518 //!
519 //! If a oscillator fault is set, the frequency returned will be based on the
520 //! fail safe mechanism of CS module. The user of this API must ensure that
521 //! CS_externalClockSourceInit API was invoked before in case XT1 or XT2 is
522 //! being used.
523 //!
524 //!
525 //! \return Current MCLK frequency in Hz
526 //
527 //*****************************************************************************
528 extern uint32_t CS_getMCLK(void);
529 
530 //*****************************************************************************
531 //
532 //! \brief Clears all the Oscillator Flags
533 //!
534 //! \param timeout is the count value that gets decremented every time the loop
535 //! that clears oscillator fault flags gets executed.
536 //!
537 //! Modified bits of \b CSCTL5 register and bits of \b SFRIFG1 register.
538 //!
539 //! \return the mask of the oscillator flag status
540 //
541 //*****************************************************************************
542 extern uint16_t CS_clearAllOscFlagsWithTimeout(uint32_t timeout);
543 
544 //*****************************************************************************
545 //
546 //! \brief Set DCO frequency
547 //!
548 //! \param dcorsel selects frequency range option. Valid options are:
549 //! CS_DCORSEL_0 [Default] CS_DCORSEL_1
550 //! Valid values are:
551 //! - \b CS_DCORSEL_0
552 //! - \b CS_DCORSEL_1
553 //! \param dcofsel selects valid frequency options based on dco frequency range
554 //! selection (dcorsel).
555 //! Valid values are:
556 //! - \b CS_DCOFSEL_0 - Low frequency option 5.33MHZ. High frequency
557 //! option 16MHz.
558 //! - \b CS_DCOFSEL_1 - Low frequency option 6.67MHZ. High frequency
559 //! option 20MHz.
560 //! - \b CS_DCOFSEL_2 - Low frequency option 5.33MHZ. High frequency
561 //! option 16MHz.
562 //! - \b CS_DCOFSEL_3 [Default] - Low frequency option 8MHZ. High
563 //! frequency option 24MHz.
564 //!
565 //! \return None
566 //
567 //*****************************************************************************
568 extern void CS_setDCOFreq(uint16_t dcorsel,
569  uint16_t dcofsel);
570 
571 //*****************************************************************************
572 //
573 // Mark the end of the C bindings section for C++ compilers.
574 //
575 //*****************************************************************************
576 #ifdef __cplusplus
577 }
578 #endif
579 
580 #endif
581 #endif // __MSP430WARE_CS_H__
uint16_t CS_clearAllOscFlagsWithTimeout(uint32_t timeout)
Clears all the Oscillator Flags.
Definition: cs.c:738
void CS_turnOffXT2(void)
Stops the XT2 oscillator using the XT2OFF bit.
Definition: cs.c:622
void CS_disableClockRequest(uint8_t selectClock)
Disables conditional module requests.
Definition: cs.c:652
uint32_t CS_getACLK(void)
Get the current ACLK frequency.
Definition: cs.c:692
uint8_t CS_getFaultFlagStatus(uint8_t mask)
Gets the current CS fault flag status.
Definition: cs.c:670
bool CS_bypassXT2WithTimeout(uint32_t timeout)
Bypasses the XT2 crystal oscillator with timeout.
Definition: cs.c:586
void CS_initClockSignal(uint8_t selectedClockSignal, uint16_t clockSource, uint16_t clockSourceDivider)
Initializes clock signal.
Definition: cs.c:192
void CS_setExternalClockSource(uint32_t XT1CLK_frequency, uint32_t XT2CLK_frequency)
Sets the external clock source.
Definition: cs.c:184
void CS_enableClockRequest(uint8_t selectClock)
Enables conditional module requests.
Definition: cs.c:634
void CS_bypassXT2(void)
Bypasses the XT2 crystal oscillator.
Definition: cs.c:517
void CS_turnOffXT1(void)
Stops the XT1 oscillator using the XT1OFF bit.
Definition: cs.c:471
bool CS_turnOnXT2WithTimeout(uint16_t xt2drive, uint32_t timeout)
Initializes the XT2 crystal oscillator with timeout.
Definition: cs.c:540
uint32_t CS_getMCLK(void)
Get the current MCLK frequency.
Definition: cs.c:724
bool CS_turnOnXT1WithTimeout(uint16_t xt1drive, uint32_t timeout)
Initializes the XT1 crystal oscillator in low frequency mode with timeout.
Definition: cs.c:370
void CS_turnOnXT2(uint16_t xt2drive)
Starts the XT2 crystal.
Definition: cs.c:481
void CS_setDCOFreq(uint16_t dcorsel, uint16_t dcofsel)
Set DCO frequency.
Definition: cs.c:763
void CS_turnOnXT1(uint16_t xt1drive)
Initializes the XT1 crystal oscillator in low frequency mode.
Definition: cs.c:265
void CS_bypassXT1(void)
Bypasses the XT1 crystal oscillator.
Definition: cs.c:335
bool CS_bypassXT1WithTimeout(uint32_t timeout)
Bypasses the XT1 crystal oscillator with timeout.
Definition: cs.c:430
void CS_turnOffSMCLK(void)
Turn off SMCLK.
Definition: cs.c:324
void CS_turnOnSMCLK(void)
Turn on SMCLK.
Definition: cs.c:313
void CS_clearFaultFlag(uint8_t mask)
Clears the current CS fault flag status for the masked bit.
Definition: cs.c:677
uint32_t CS_getSMCLK(void)
Get the current SMCLK frequency.
Definition: cs.c:707

Copyright 2020, Texas Instruments Incorporated