#include <msp430.h>
Go to the source code of this file.
|
| void | setupClocks () |
| | Setup clocks of system, all to LFXTAL input, get called from main()
|
| |
◆ setupClocks()
Setup clocks of system, all to LFXTAL input, get called from main()
Definition at line 16 of file clock.c.
17{
18 BCSCTL1 |= XT2OFF;
19 BCSCTL1 &= ~XTS;
20 BCSCTL1 |= DIVA_0;
21
22
23
24 BCSCTL2 |= SELS;
25 BCSCTL2 |= DIVS_0;
26 BCSCTL3 |= LFXT1S_0;
27 BCSCTL3 |= XCAP_2;
28
29
30 BCSCTL1 |= CALBC1_1MHZ;
31 DCOCTL |= CALDCO_1MHZ;
32 BCSCTL2 |= SELM_0;
33 BCSCTL2 |= DIVM_0;
34
35
36
37 while (IFG1 & OFIFG) {
38 IFG1 &= ~OFIFG;
39 __delay_cycles(1000);
40 }
41}
Referenced by main().