MSP430G2553 default MCLK, SMCLK, ACLK clock frequencies
[Copy link]
The platform used is MSP-EXP430G2 LaunchPad, and the MCU is MSP430G2553. The timer method can also be verified using the following code, for example, verifying ACLK. -
- #include
-
- void main(void)
- {
- WDTCTL = WDTPW + WDTHOLD;
- P1DIR |= BIT0;
- P1OUT |= BIT0;
- /* Clock source ACLK clear counter increment mode to enable timer A interrupt*/
- TACTL |= TASSEL_1 + TACLR + MC_1 + TAIE;
- TACCR0 = 1024; //Frequency: 32768/1024/2=16Hz
- _EINT(); //Open total interrupt
-
- while(1)
- {
- LPM3; //Enter low power mode 3
- }
- }
- #pragma vector = TIMER0_A1_VECTOR
- __interrupt void Timer_A(void)
- {
- switch(TAIV)
- {
- case 2: break;
- case 4: break;
- case 10: P1OUT ^= BIT0; //Interrupt task
- break;
- }
- }
Compile and load the above code into the g2553 development board, and you can see the red LED flashing. After measuring the P1.0 port with an oscilloscope, we found that its frequency is 15.98Hz. From this, we can infer that the auxiliary clock used by timer A is indeed an external low-frequency crystal oscillator 32.768kHz. Summary: We introduce how to determine the default clock frequencies of the three clocks of the G2553 system. We try to practice as much as possible, and we can see the clock frequency value of the system very intuitively.
|