MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.21.00.08
 All Data Structures Functions Variables Modules Pages
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 #if defined(__MSP430_HAS_CS__) || defined(__MSP430_HAS_SFR__)
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_VLOCLK_SELECT SELM__VLOCLK
57 #define CS_DCOCLK_SELECT SELM__DCOCLK
58 #define CS_LFXTCLK_SELECT SELM__LFXTCLK
59 #define CS_HFXTCLK_SELECT SELM__HFXTCLK
60 #define CS_LFMODOSC_SELECT SELM__LFMODOSC
61 #define CS_MODOSC_SELECT SELM__MODOSC
62 
63 //*****************************************************************************
64 //
65 // The following are values that can be passed to the lfxtdrive parameter for
66 // functions: CS_turnOnLFXT(), and CS_turnOnLFXTWithTimeout().
67 //
68 //*****************************************************************************
69 #define CS_LFXT_DRIVE_0 LFXTDRIVE_0
70 #define CS_LFXT_DRIVE_1 LFXTDRIVE_1
71 #define CS_LFXT_DRIVE_2 LFXTDRIVE_2
72 #define CS_LFXT_DRIVE_3 LFXTDRIVE_3
73 
74 //*****************************************************************************
75 //
76 // The following are values that can be passed to the hfxtdrive parameter for
77 // functions: CS_turnOnHFXT(), and CS_turnOnHFXTWithTimeout().
78 //
79 //*****************************************************************************
80 #define CS_HFXT_DRIVE_4MHZ_8MHZ HFXTDRIVE_0
81 #define CS_HFXT_DRIVE_8MHZ_16MHZ HFXTDRIVE_1
82 #define CS_HFXT_DRIVE_16MHZ_24MHZ HFXTDRIVE_2
83 #define CS_HFXT_DRIVE_24MHZ_32MHZ HFXTDRIVE_3
84 
85 //*****************************************************************************
86 //
87 // The following are values that can be passed to the mask parameter for
88 // functions: CS_getFaultFlagStatus(), and CS_clearFaultFlag() as well as
89 // returned by the CS_getFaultFlagStatus() function.
90 //
91 //*****************************************************************************
92 #define CS_LFXTOFFG LFXTOFFG
93 #define CS_HFXTOFFG HFXTOFFG
94 
95 //*****************************************************************************
96 //
97 // The following are values that can be passed to the dcorsel parameter for
98 // functions: CS_setDCOFreq().
99 //
100 //*****************************************************************************
101 #define CS_DCORSEL_0 0x00
102 #define CS_DCORSEL_1 DCORSEL
103 
104 //*****************************************************************************
105 //
106 // The following are values that can be passed to the dcofsel parameter for
107 // functions: CS_setDCOFreq().
108 //
109 //*****************************************************************************
110 #define CS_DCOFSEL_0 DCOFSEL_0
111 #define CS_DCOFSEL_1 DCOFSEL_1
112 #define CS_DCOFSEL_2 DCOFSEL_2
113 #define CS_DCOFSEL_3 DCOFSEL_3
114 #define CS_DCOFSEL_4 DCOFSEL_4
115 #define CS_DCOFSEL_5 DCOFSEL_5
116 #define CS_DCOFSEL_6 DCOFSEL_6
117 
118 //*****************************************************************************
119 //
120 // Prototypes for the APIs.
121 //
122 //*****************************************************************************
123 
124 //*****************************************************************************
125 //
126 //! \brief Sets the external clock source
127 //!
128 //! This function sets the external clock sources LFXT and HFXT crystal
129 //! oscillator frequency values. This function must be called if an external
130 //! crystal LFXT or HFXT is used and the user intends to call CS_getMCLK,
131 //! CS_getSMCLK, CS_getACLK and CS_turnOnLFXT, CS_LFXTByPass,
132 //! CS_turnOnLFXTWithTimeout, CS_LFXTByPassWithTimeout, CS_turnOnHFXT,
133 //! CS_HFXTByPass, CS_turnOnHFXTWithTimeout, CS_HFXTByPassWithTimeout.
134 //!
135 //! \param LFXTCLK_frequency is the LFXT crystal frequencies in Hz
136 //! \param HFXTCLK_frequency is the HFXT crystal frequencies in Hz
137 //!
138 //! \return None
139 //
140 //*****************************************************************************
141 extern void CS_setExternalClockSource(uint32_t LFXTCLK_frequency,
142  uint32_t HFXTCLK_frequency);
143 
144 //*****************************************************************************
145 //
146 //! \brief Initializes clock signal
147 //!
148 //! This function initializes each of the clock signals. The user must ensure
149 //! that this function is called for each clock signal. If not, the default
150 //! state is assumed for the particular clock signal. Refer to MSP430ware
151 //! documentation for CS module or Device Family User's Guide for details of
152 //! default clock signal states.
153 //!
154 //! \param selectedClockSignal Selected clock signal
155 //! Valid values are:
156 //! - \b CS_ACLK
157 //! - \b CS_MCLK
158 //! - \b CS_SMCLK
159 //! - \b CS_MODOSC
160 //! \param clockSource is the selected clock signal
161 //! Valid values are:
162 //! - \b CS_VLOCLK_SELECT
163 //! - \b CS_DCOCLK_SELECT - [Not available for ACLK]
164 //! - \b CS_LFXTCLK_SELECT
165 //! - \b CS_HFXTCLK_SELECT - [Not available for ACLK]
166 //! - \b CS_LFMODOSC_SELECT
167 //! - \b CS_MODOSC_SELECT - [Not available for ACLK]
168 //! \param clockSourceDivider is the selected clock divider to calculate clock
169 //! signal from clock source.
170 //! Valid values are:
171 //! - \b CS_CLOCK_DIVIDER_1 - [Default for ACLK]
172 //! - \b CS_CLOCK_DIVIDER_2
173 //! - \b CS_CLOCK_DIVIDER_4
174 //! - \b CS_CLOCK_DIVIDER_8 - [Default for SMCLK and MCLK]
175 //! - \b CS_CLOCK_DIVIDER_16
176 //! - \b CS_CLOCK_DIVIDER_32
177 //!
178 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL3 register and bits of
179 //! \b CSCTL2 register.
180 //!
181 //! \return None
182 //
183 //*****************************************************************************
184 extern void CS_initClockSignal(uint8_t selectedClockSignal,
185  uint16_t clockSource,
186  uint16_t clockSourceDivider);
187 
188 //*****************************************************************************
189 //
190 //! \brief Initializes the LFXT crystal in low frequency mode.
191 //!
192 //! Initializes the LFXT crystal oscillator in low frequency mode. Loops until
193 //! all oscillator fault flags are cleared, with no timeout. See the device-
194 //! specific data sheet for appropriate drive settings. IMPORTANT: User must
195 //! call CS_setExternalClockSource function to set frequency of external clocks
196 //! before calling this function.
197 //!
198 //! \param lfxtdrive is the target drive strength for the LFXT crystal
199 //! oscillator.
200 //! Valid values are:
201 //! - \b CS_LFXT_DRIVE_0
202 //! - \b CS_LFXT_DRIVE_1
203 //! - \b CS_LFXT_DRIVE_2
204 //! - \b CS_LFXT_DRIVE_3 [Default]
205 //!
206 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
207 //! CSCTL4 register and bits of \b SFRIFG1 register.
208 //!
209 //! \return None
210 //
211 //*****************************************************************************
212 extern void CS_turnOnLFXT(uint16_t lfxtdrive);
213 
214 //*****************************************************************************
215 //
216 //! \brief Turns off SMCLK using the SMCLKOFF bit.
217 //!
218 //!
219 //! Modified bits of \b CSCTL4 register.
220 //!
221 //! \return None
222 //
223 //*****************************************************************************
224 extern void CS_turnOffSMCLK(void);
225 
226 //*****************************************************************************
227 //
228 //! \brief Turns on SMCLK using the SMCLKOFF bit.
229 //!
230 //!
231 //! Modified bits of \b CSCTL4 register.
232 //!
233 //! \return None
234 //
235 //*****************************************************************************
236 extern void CS_turnOnSMCLK(void);
237 
238 //*****************************************************************************
239 //
240 //! \brief Bypasses the LFXT crystal oscillator.
241 //!
242 //! Bypasses the LFXT crystal oscillator. Loops until all oscillator fault
243 //! flags are cleared, with no timeout. IMPORTANT: User must call
244 //! CS_setExternalClockSource function to set frequency of external clocks
245 //! before calling this function.
246 //!
247 //!
248 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
249 //! CSCTL4 register and bits of \b SFRIFG register.
250 //!
251 //! \return None
252 //
253 //*****************************************************************************
254 extern void CS_bypassLFXT(void);
255 
256 //*****************************************************************************
257 //
258 //! \brief Initializes the LFXT crystal oscillator in low frequency mode with
259 //! timeout.
260 //!
261 //! Initializes the LFXT crystal oscillator in low frequency mode with timeout.
262 //! Loops until all oscillator fault flags are cleared or until a timeout
263 //! counter is decremented and equals to zero. See the device-specific
264 //! datasheet for appropriate drive settings. IMPORTANT: User must call
265 //! CS_setExternalClockSource to set frequency of external clocks before
266 //! calling this function.
267 //!
268 //! \param lfxtdrive is the target drive strength for the LFXT crystal
269 //! oscillator.
270 //! Valid values are:
271 //! - \b CS_LFXT_DRIVE_0
272 //! - \b CS_LFXT_DRIVE_1
273 //! - \b CS_LFXT_DRIVE_2
274 //! - \b CS_LFXT_DRIVE_3 [Default]
275 //! \param timeout is the count value that gets decremented every time the loop
276 //! that clears oscillator fault flags gets executed.
277 //!
278 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
279 //! CSCTL4 register and bits of \b SFRIFG1 register.
280 //!
281 //! \return STATUS_SUCCESS or STATUS_FAIL indicating if the LFXT crystal
282 //! oscillator was initialized successfully
283 //
284 //*****************************************************************************
285 extern bool CS_turnOnLFXTWithTimeout(uint16_t lfxtdrive,
286  uint32_t timeout);
287 
288 //*****************************************************************************
289 //
290 //! \brief Bypass the LFXT crystal oscillator with timeout.
291 //!
292 //! Bypasses the LFXT crystal oscillator with timeout. Loops until all
293 //! oscillator fault flags are cleared or until a timeout counter is
294 //! decremented and equals to zero. NOTE: User must call
295 //! CS_setExternalClockSource to set frequency of external clocks before
296 //! calling this function.
297 //!
298 //! \param timeout is the count value that gets decremented every time the loop
299 //! that clears oscillator fault flags gets executed.
300 //!
301 //! Modified bits of \b CSCTL0 register, bits of \b CSCTL5 register, bits of \b
302 //! CSCTL4 register and bits of \b SFRIFG register.
303 //!
304 //! \return STATUS_SUCCESS or STATUS_FAIL
305 //
306 //*****************************************************************************
307 extern bool CS_bypassLFXTWithTimeout(uint32_t timeout);
308 
309 //*****************************************************************************
310 //
311 //! \brief Stops the LFXT oscillator using the LFXTOFF bit.
312 //!
313 //!
314 //! Modified bits of \b CSCTL4 register.
315 //!
316 //! \return None
317 //
318 //*****************************************************************************
319 extern void CS_turnOffLFXT(void);
320 
321 //*****************************************************************************
322 //
323 //! \brief Starts the HFXFT crystal
324 //!
325 //! Initializes the HFXT crystal oscillator, which supports crystal frequencies
326 //! between 0 MHz and 24 MHz, depending on the selected drive strength. Loops
327 //! until all oscillator fault flags are cleared, with no timeout. See the
328 //! device-specific data sheet for appropriate drive settings. NOTE: User must
329 //! call CS_setExternalClockSource to set frequency of external clocks before
330 //! calling this function.
331 //!
332 //! \param hfxtdrive is the target drive strength for the HFXT crystal
333 //! oscillator.
334 //! Valid values are:
335 //! - \b CS_HFXT_DRIVE_4MHZ_8MHZ
336 //! - \b CS_HFXT_DRIVE_8MHZ_16MHZ
337 //! - \b CS_HFXT_DRIVE_16MHZ_24MHZ
338 //! - \b CS_HFXT_DRIVE_24MHZ_32MHZ [Default]
339 //!
340 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
341 //! \b SFRIFG1 register.
342 //!
343 //! \return None
344 //
345 //*****************************************************************************
346 extern void CS_turnOnHFXT(uint16_t hfxtdrive);
347 
348 //*****************************************************************************
349 //
350 //! \brief Bypasses the HFXT crystal oscillator
351 //!
352 //! Bypasses the HFXT crystal oscillator, which supports crystal frequencies
353 //! between 0 MHz and 24 MHz. Loops until all oscillator fault flags are
354 //! cleared, with no timeout.NOTE: User must call CS_setExternalClockSource to
355 //! set frequency of external clocks before calling this function.
356 //!
357 //!
358 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
359 //! \b SFRIFG register.
360 //!
361 //! \return None
362 //
363 //*****************************************************************************
364 extern void CS_bypassHFXT(void);
365 
366 //*****************************************************************************
367 //
368 //! \brief Initializes the HFXT crystal oscillator with timeout.
369 //!
370 //! Initializes the HFXT crystal oscillator, which supports crystal frequencies
371 //! between 0 MHz and 24 MHz, depending on the selected drive strength. Loops
372 //! until all oscillator fault flags are cleared or until a timeout counter is
373 //! decremented and equals to zero. See the device-specific data sheet for
374 //! appropriate drive settings. NOTE: User must call CS_setExternalClockSource
375 //! to set frequency of external clocks before calling this function.
376 //!
377 //! \param hfxtdrive is the target drive strength for the HFXT crystal
378 //! oscillator.
379 //! Valid values are:
380 //! - \b CS_HFXT_DRIVE_4MHZ_8MHZ
381 //! - \b CS_HFXT_DRIVE_8MHZ_16MHZ
382 //! - \b CS_HFXT_DRIVE_16MHZ_24MHZ
383 //! - \b CS_HFXT_DRIVE_24MHZ_32MHZ [Default]
384 //! \param timeout is the count value that gets decremented every time the loop
385 //! that clears oscillator fault flags gets executed.
386 //!
387 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
388 //! \b SFRIFG1 register.
389 //!
390 //! \return STATUS_SUCCESS or STATUS_FAIL
391 //
392 //*****************************************************************************
393 extern bool CS_turnOnHFXTWithTimeout(uint16_t hfxtdrive,
394  uint32_t timeout);
395 
396 //*****************************************************************************
397 //
398 //! \brief Bypasses the HFXT crystal oscillator with timeout
399 //!
400 //! Bypasses the HFXT crystal oscillator, which supports crystal frequencies
401 //! between 0 MHz and 24 MHz. Loops until all oscillator fault flags are
402 //! cleared or until a timeout counter is decremented and equals to zero. NOTE:
403 //! User must call CS_setExternalClockSource to set frequency of external
404 //! clocks before calling this function.
405 //!
406 //! \param timeout is the count value that gets decremented every time the loop
407 //! that clears oscillator fault flags gets executed.
408 //!
409 //! Modified bits of \b CSCTL5 register, bits of \b CSCTL4 register and bits of
410 //! \b SFRIFG1 register.
411 //!
412 //! \return STATUS_SUCCESS or STATUS_FAIL
413 //
414 //*****************************************************************************
415 extern bool CS_bypassHFXTWithTimeout(uint32_t timeout);
416 
417 //*****************************************************************************
418 //
419 //! \brief Stops the HFXT oscillator using the HFXTOFF bit.
420 //!
421 //!
422 //! Modified bits of \b CSCTL4 register.
423 //!
424 //! \return None
425 //
426 //*****************************************************************************
427 extern void CS_turnOffHFXT(void);
428 
429 //*****************************************************************************
430 //
431 //! \brief Enables conditional module requests
432 //!
433 //! \param selectClock selects specific request enables.
434 //! Valid values are:
435 //! - \b CS_ACLK
436 //! - \b CS_MCLK
437 //! - \b CS_SMCLK
438 //! - \b CS_MODOSC
439 //!
440 //! Modified bits of \b CSCTL6 register.
441 //!
442 //! \return None
443 //
444 //*****************************************************************************
445 extern void CS_enableClockRequest(uint8_t selectClock);
446 
447 //*****************************************************************************
448 //
449 //! \brief Disables conditional module requests
450 //!
451 //! \param selectClock selects specific request enables.
452 //! Valid values are:
453 //! - \b CS_ACLK
454 //! - \b CS_MCLK
455 //! - \b CS_SMCLK
456 //! - \b CS_MODOSC
457 //!
458 //! Modified bits of \b CSCTL6 register.
459 //!
460 //! \return None
461 //
462 //*****************************************************************************
463 extern void CS_disableClockRequest(uint8_t selectClock);
464 
465 //*****************************************************************************
466 //
467 //! \brief Gets the current CS fault flag status.
468 //!
469 //! \param mask is the masked interrupt flag status to be returned. Mask
470 //! parameter can be either any of the following selection.
471 //! Mask value is the logical OR of any of the following:
472 //! - \b CS_LFXTOFFG - LFXT oscillator fault flag
473 //! - \b CS_HFXTOFFG - HFXT oscillator fault flag
474 //!
475 //! \return Logical OR of any of the following:
476 //! - \b CS_LFXTOFFG LFXT oscillator fault flag
477 //! - \b CS_HFXTOFFG HFXT oscillator fault flag
478 //! \n indicating the status of the masked interrupts
479 //
480 //*****************************************************************************
481 extern uint8_t CS_getFaultFlagStatus(uint8_t mask);
482 
483 //*****************************************************************************
484 //
485 //! \brief Clears the current CS fault flag status for the masked bit.
486 //!
487 //! \param mask is the masked interrupt flag status to be returned. mask
488 //! parameter can be any one of the following
489 //! Mask value is the logical OR of any of the following:
490 //! - \b CS_LFXTOFFG - LFXT oscillator fault flag
491 //! - \b CS_HFXTOFFG - HFXT oscillator fault flag
492 //!
493 //! Modified bits of \b CSCTL5 register.
494 //!
495 //! \return None
496 //
497 //*****************************************************************************
498 extern void CS_clearFaultFlag(uint8_t mask);
499 
500 //*****************************************************************************
501 //
502 //! \brief Get the current ACLK 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 LFXT or HFXT is
507 //! being used.
508 //!
509 //!
510 //! \return Current ACLK frequency in Hz
511 //
512 //*****************************************************************************
513 extern uint32_t CS_getACLK(void);
514 
515 //*****************************************************************************
516 //
517 //! \brief Get the current SMCLK 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 LFXT or HFXT is
522 //! being used.
523 //!
524 //!
525 //! \return Current SMCLK frequency in Hz
526 //
527 //*****************************************************************************
528 extern uint32_t CS_getSMCLK(void);
529 
530 //*****************************************************************************
531 //
532 //! \brief Get the current MCLK frequency.
533 //!
534 //! If a oscillator fault is set, the frequency returned will be based on the
535 //! fail safe mechanism of CS module. The user of this API must ensure that
536 //! CS_externalClockSourceInit API was invoked before in case LFXT or HFXT is
537 //! being used.
538 //!
539 //!
540 //! \return Current MCLK frequency in Hz
541 //
542 //*****************************************************************************
543 extern uint32_t CS_getMCLK(void);
544 
545 //*****************************************************************************
546 //
547 //! \brief Turns off VLO
548 //!
549 //!
550 //! Modified bits of \b CSCTL4 register.
551 //!
552 //! \return None
553 //
554 //*****************************************************************************
555 extern void CS_turnOffVLO(void);
556 
557 //*****************************************************************************
558 //
559 //! \brief Clears all the Oscillator Flags
560 //!
561 //! \param timeout is the count value that gets decremented every time the loop
562 //! that clears oscillator fault flags gets executed.
563 //!
564 //! Modified bits of \b CSCTL5 register and bits of \b SFRIFG1 register.
565 //!
566 //! \return the mask of the oscillator flag status
567 //
568 //*****************************************************************************
569 extern uint16_t CS_clearAllOscFlagsWithTimeout(uint32_t timeout);
570 
571 //*****************************************************************************
572 //
573 //! \brief Set DCO frequency
574 //!
575 //! \param dcorsel selects frequency range option.
576 //! Valid values are:
577 //! - \b CS_DCORSEL_0 [Default] - Low Frequency Option
578 //! - \b CS_DCORSEL_1 - High Frequency Option
579 //! \param dcofsel selects valid frequency options based on dco frequency range
580 //! selection (dcorsel)
581 //! Valid values are:
582 //! - \b CS_DCOFSEL_0 - Low frequency option 1MHz. High frequency option
583 //! 1MHz.
584 //! - \b CS_DCOFSEL_1 - Low frequency option 2.67MHz. High frequency
585 //! option 5.33MHz.
586 //! - \b CS_DCOFSEL_2 - Low frequency option 3.33MHz. High frequency
587 //! option 6.67MHz.
588 //! - \b CS_DCOFSEL_3 - Low frequency option 4MHz. High frequency option
589 //! 8MHz.
590 //! - \b CS_DCOFSEL_4 - Low frequency option 5.33MHz. High frequency
591 //! option 16MHz.
592 //! - \b CS_DCOFSEL_5 - Low frequency option 6.67MHz. High frequency
593 //! option 20MHz.
594 //! - \b CS_DCOFSEL_6 - Low frequency option 8MHz. High frequency option
595 //! 24MHz.
596 //!
597 //! \return None
598 //
599 //*****************************************************************************
600 extern void CS_setDCOFreq(uint16_t dcorsel,
601  uint16_t dcofsel);
602 
603 //*****************************************************************************
604 //
605 // Mark the end of the C bindings section for C++ compilers.
606 //
607 //*****************************************************************************
608 #ifdef __cplusplus
609 }
610 #endif
611 
612 #endif
613 #endif // __MSP430WARE_CS_H__
uint16_t CS_clearAllOscFlagsWithTimeout(uint32_t timeout)
Clears all the Oscillator Flags.
Definition: cs.c:852
void CS_turnOnHFXT(uint16_t hfxtdrive)
Starts the HFXFT crystal.
Definition: cs.c:504
bool CS_turnOnHFXTWithTimeout(uint16_t hfxtdrive, uint32_t timeout)
Initializes the HFXT crystal oscillator with timeout.
Definition: cs.c:600
void CS_disableClockRequest(uint8_t selectClock)
Disables conditional module requests.
Definition: cs.c:749
uint32_t CS_getACLK(void)
Get the current ACLK frequency.
Definition: cs.c:794
void CS_turnOffLFXT(void)
Stops the LFXT oscillator using the LFXTOFF bit.
Definition: cs.c:492
uint8_t CS_getFaultFlagStatus(uint8_t mask)
Gets the current CS fault flag status.
Definition: cs.c:767
void CS_turnOffVLO(void)
Turns off VLO.
Definition: cs.c:841
bool CS_bypassLFXTWithTimeout(uint32_t timeout)
Bypass the LFXT crystal oscillator with timeout.
Definition: cs.c:455
bool CS_turnOnLFXTWithTimeout(uint16_t lfxtdrive, uint32_t timeout)
Initializes the LFXT crystal oscillator in low frequency mode with timeout.
Definition: cs.c:402
void CS_turnOffHFXT(void)
Stops the HFXT oscillator using the HFXTOFF bit.
Definition: cs.c:719
bool CS_bypassHFXTWithTimeout(uint32_t timeout)
Bypasses the HFXT crystal oscillator with timeout.
Definition: cs.c:666
void CS_initClockSignal(uint8_t selectedClockSignal, uint16_t clockSource, uint16_t clockSourceDivider)
Initializes clock signal.
Definition: cs.c:237
void CS_bypassLFXT(void)
Bypasses the LFXT crystal oscillator.
Definition: cs.c:373
void CS_bypassHFXT(void)
Bypasses the HFXT crystal oscillator.
Definition: cs.c:558
void CS_enableClockRequest(uint8_t selectClock)
Enables conditional module requests.
Definition: cs.c:731
uint32_t CS_getMCLK(void)
Get the current MCLK frequency.
Definition: cs.c:828
void CS_turnOnLFXT(uint16_t lfxtdrive)
Initializes the LFXT crystal in low frequency mode.
Definition: cs.c:311
void CS_setDCOFreq(uint16_t dcorsel, uint16_t dcofsel)
Set DCO frequency.
Definition: cs.c:875
void CS_turnOffSMCLK(void)
Turns off SMCLK using the SMCLKOFF bit.
Definition: cs.c:353
void CS_turnOnSMCLK(void)
Turns on SMCLK using the SMCLKOFF bit.
Definition: cs.c:363
void CS_clearFaultFlag(uint8_t mask)
Clears the current CS fault flag status for the masked bit.
Definition: cs.c:777
void CS_setExternalClockSource(uint32_t LFXTCLK_frequency, uint32_t HFXTCLK_frequency)
Sets the external clock source.
Definition: cs.c:229
uint32_t CS_getSMCLK(void)
Get the current SMCLK frequency.
Definition: cs.c:811

Copyright 2015, Texas Instruments Incorporated