Example Analysis:
1. The CPU runs under the VLO clock:
This is the slowest clock, running at about 12 kHz. Therefore, we will visualize the LED flashing red slowly at a rate of about every 3 seconds.
We can let the clock system default to this state and set it up specifically to operate VLO. We will not use any ALCK peripheral clocks in this lab,
but you should realize that ACLK comes from the VLO clock.
#include
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
turn off the watchdog timer
P1DIR = 0x40;
configure output
P1OUT = 0;
turn off LED
BCSCTL3 |= LFXT1S_2;
IFG1 &= ~OFIFG;
clear OSCFault flag
__bis_SR_register(SCG1 + SCG0);
turn off DCO
BCSCTL2 |= SELM_3 + DIVM_3;
while(1)
{
P1OUT = 0x40;
turn on LED
_delay_cycles(100);
P1OUT = 0;
turn off LED
_delay_cycles(5000);
}
}
Keywords:MSP430
Reference address:MSP430 Clock Settings (Part 2)
1. The CPU runs under the VLO clock:
This is the slowest clock, running at about 12 kHz. Therefore, we will visualize the LED flashing red slowly at a rate of about every 3 seconds.
We can let the clock system default to this state and set it up specifically to operate VLO. We will not use any ALCK peripheral clocks in this lab,
but you should realize that ACLK comes from the VLO clock.
#include
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
turn off the watchdog timer
P1DIR = 0x40;
configure output
P1OUT = 0;
turn off LED
BCSCTL3 |= LFXT1S_2;
IFG1 &= ~OFIFG;
clear OSCFault flag
__bis_SR_register(SCG1 + SCG0);
turn off DCO
BCSCTL2 |= SELM_3 + DIVM_3;
while(1)
{
P1OUT = 0x40;
turn on LED
_delay_cycles(100);
P1OUT = 0;
turn off LED
_delay_cycles(5000);
}
}
Previous article:MSP430 Clock Settings (Part 3)
Next article:MSP430 Clock Settings (I)
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
Guess you like
- LTspice .subckt(3) reverse drawing
- TI blog post: Buck-boost DCDC TPS63810 in TWS headphones
- USB5537B, does not start after first power on, but restarts normally after power off
- Showing off the EEWorld 15th Anniversary T-shirt
- Dating Spring - Vegetable Garden and Fruits at Home
- Universal fast charging: the future of battery-powered applications
- EEWORLD University ---- RT-Thread Nano Learning
- Smart microcontroller MM32F013x-Build Eclipse development environment under Windows
- I've been stuck here for a long time. If I can solve this problem, I can solve the third problem.
- TE Online Classroom: Experts interpret the design trends of contemporary IoT smart antennas