MSP430

MSP430, CCS, 16MHz Clock

CoyoteUgly 2018. 9. 3. 19:01

MSP430, CCS, 16MHz Clock



msp430.h 를 사용하는 소스입니다.


Did you have a look at the example codes for the MCU that is provided by TI for almost every processor?


www.ti.com/lit/zip/slac536


The following examples show how to set up the clocks:

msp430fr59xx_cs_01.c       Configure MCLK for 8MHz operation
msp430fr59xx_cs_02.c       Configure MCLK for 16MHz operation
msp430fr59xx_cs_03.c       Output 32768Hz crystal on XT1 and observe failsafe
msp430fr59xx_cs_04.c       ACLK = XT1 = 32768Hz, SMCLK= XT2 = 8MHz, MCLK = DCO
msp430fr59xx_cs_05.c       Using LFXT in bypass mode, failsafe operation shown


0. 참고 사항



출처: http://coyoteugly.tistory.com/188 [마이콤 개발자를 위한 여행]


Did you have a look at the example codes for the MCU that is provided by TI for almost every processor?

www.ti.com/lit/zip/slac536

The following examples show how to set up the clocks:

msp430fr59xx_cs_01.c       Configure MCLK for 8MHz operation
msp430fr59xx_cs_02.c       Configure MCLK for 16MHz operation
msp430fr59xx_cs_03.c       Output 32768Hz crystal on XT1 and observe failsafe
msp430fr59xx_cs_04.c       ACLK = XT1 = 32768Hz, SMCLK= XT2 = 8MHz, MCLK = DCO
msp430fr59xx_cs_05.c       Using LFXT in bypass mode, failsafe operation shown


0. 참고 사항


1. 소스 설명

full 소스는 아래 github를 통해 확인하세요.


    // Configure one FRAM waitstate as required by the device datasheet for MCLK
    // operation beyond 8MHz _before_ configuring the clock system.
    FRCTL0 = FRCTLPW | NWAITS_1;

    // Clock System Setup
    CSCTL0_H = CSKEY >> 8;                    // Unlock CS registers
    CSCTL1 = DCOFSEL_4 | DCORSEL;            // Set DCO to 16MHz
    CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK; // Set SMCLK = MCLK = DCO,
    // ACLK = VLOCLK
    CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1;     // Set all dividers
    CSCTL0_H = 0;                             // Lock CS registers
 


2. 소스


3. 결과


'MSP430' 카테고리의 다른 글

MSP430, CCS, USCI_A0, UartEcho  (0) 2018.09.03
MSP430, MSP430FR6x8x_Code_Examples  (0) 2018.09.03
MSP430, CCS, 8MHz Clock  (0) 2018.09.03
MSP430, CCS, Gpio Interrupt  (0) 2018.09.03
MSP430. CCS, Timer Interrupt  (0) 2018.09.03