Hi Experts,
I am using a MSP430FR5972 controller for my project ,I need to invoke built-in timers so that it could be used to automatically drive each LED connected to pin as follows
LED |
Timer pin |
Stimulation Green |
TA0.1 |
Stimulation Yellow |
TA0.2 |
Battery Green |
TA1.1 |
Battery Yellow |
TA1.2 |
I want GPIO pins can be set to be driven by the timer peripherals. LED can be set to ON or OFF (active low) in the timer registers, or the timers can be configured to switch the pins periodically without the need for interrupts or delay cycles.
Adding further more I using the clock settings as under in my code:
// Clock System Setup
CSCTL0_H = CSKEY >> 8;
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 registersM
Can you please help how to user timer in this mode or provide any example code to solve my above query.