2188 views|0 replies

3836

Posts

19

Resources
The OP
 

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.


This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list