Functions
timera.c File Reference
#include "inc/hw_types.h"
#include "driverlib/5xx_6xx/debug.h"
#include "driverlib/5xx_6xx/timera.h"
#include "deprecated/CCS/msp430xgeneric.h"

Functions

void privateTimerAProcessClockSourceDivider (unsigned int baseAddress, unsigned int clockSourceDivider)
void TimerA_startCounter (unsigned int baseAddress, unsigned int timerMode)
void TimerA_configureContinuousMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerInterruptEnable_TAIE, unsigned int timerClear)
void TimerA_configureUpMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerPeriod, unsigned int timerInterruptEnable_TAIE, unsigned int captureCompareInterruptEnable_CCR0_CCIE, unsigned int timerClear)
void TimerA_configureUpDownMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerPeriod, unsigned int timerInterruptEnable_TAIE, unsigned int captureCompareInterruptEnable_CCR0_CCIE, unsigned int timerClear)
void TimerA_startContinuousMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerInterruptEnable_TAIE, unsigned int timerClear)
void TimerA_startContinousMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerInterruptEnable_TAIE, unsigned int timerClear)
void TimerA_startUpMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerPeriod, unsigned int timerInterruptEnable_TAIE, unsigned int captureCompareInterruptEnable_CCR0_CCIE, unsigned int timerClear)
void TimerA_startUpDownMode (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerPeriod, unsigned int timerInterruptEnable_TAIE, unsigned int captureCompareInterruptEnable_CCR0_CCIE, unsigned int timerClear)
void TimerA_initCapture (unsigned int baseAddress, unsigned int captureRegister, unsigned int captureMode, unsigned int captureInputSelect, unsigned short synchronizeCaptureSource, unsigned short captureInterruptEnable, unsigned int captureOutputMode)
void TimerA_initCompare (unsigned int baseAddress, unsigned int compareRegister, unsigned short compareInterruptEnable, unsigned int compareOutputMode, unsigned int compareValue)
void TimerA_enableInterrupt (unsigned int baseAddress)
void TimerA_disableInterrupt (unsigned int baseAddress)
unsigned long TimerA_getInterruptStatus (unsigned int baseAddress)
void TimerA_enableCaptureCompareInterrupt (unsigned int baseAddress, unsigned int captureCompareRegister)
void TimerA_disableCaptureCompareInterrupt (unsigned int baseAddress, unsigned int captureCompareRegister)
unsigned long TimerA_getCaptureCompareInterruptStatus (unsigned int baseAddress, unsigned int captureCompareRegister, unsigned int mask)
void TimerA_clear (unsigned int baseAddress)
unsigned short TimerA_getSynchronizedCaptureCompareInput (unsigned int baseAddress, unsigned int captureCompareRegister, unsigned short synchronized)
unsigned char TimerA_getOutputForOutputModeOutBitValue (unsigned int baseAddress, unsigned int captureCompareRegister)
unsigned int TimerA_getCaptureCompareCount (unsigned int baseAddress, unsigned int captureCompareRegister)
void TimerA_setOutputForOutputModeOutBitValue (unsigned int baseAddress, unsigned int captureCompareRegister, unsigned char outputModeOutBitValue)
void TimerA_generatePWM (unsigned int baseAddress, unsigned int clockSource, unsigned int clockSourceDivider, unsigned int timerPeriod, unsigned int compareRegister, unsigned int compareOutputMode, unsigned int dutyCycle)
void TimerA_stop (unsigned int baseAddress)
void TimerA_setCompareValue (unsigned int baseAddress, unsigned int compareRegister, unsigned int compareValue)
void TimerA_clearTimerInterruptFlag (unsigned int baseAddress)
void TimerA_clearCaptureCompareInterruptFlag (unsigned int baseAddress, unsigned int captureCompareRegister)

Function Documentation

void privateTimerAProcessClockSourceDivider ( unsigned int  baseAddress,
unsigned int  clockSourceDivider 
)
void TimerA_startCounter ( unsigned int  baseAddress,
unsigned int  timerMode 
)

Starts TimerA counter

Parameters:
baseAddressis the base address of the TimerA module.
clockSourceselects Clock source. Valid values are TIMERA_CONTINUOUS_MODE [Default value] TIMERA_UPDOWN_MODE TIMERA_UP_MODE Modified register is TAxCTL

NOTE: This function assumes that the timer has been previously configured using TimerA_configureContinuousMode, TimerA_configureUpMode or TimerA_configureUpDownMode.

Returns:
None

References ASSERT, HWREG, TIMERA_CONTINUOUS_MODE, TIMERA_UP_MODE, and TIMERA_UPDOWN_MODE.

void TimerA_configureContinuousMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  timerClear 
)

Configures TimerA in continuous mode.

Parameters:
baseAddressis the base address of the TimerA module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerInterruptEnable_TAIEis to enable or disable TimerA interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
timerCleardecides if TimerA clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified reister is TAxCTL

This API does not start the timer. Timer needs to be started when required using the TimerA_startCounter API.

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_DIVIDER_1, TIMERA_CLOCKSOURCE_DIVIDER_10, TIMERA_CLOCKSOURCE_DIVIDER_12, TIMERA_CLOCKSOURCE_DIVIDER_14, TIMERA_CLOCKSOURCE_DIVIDER_16, TIMERA_CLOCKSOURCE_DIVIDER_2, TIMERA_CLOCKSOURCE_DIVIDER_20, TIMERA_CLOCKSOURCE_DIVIDER_24, TIMERA_CLOCKSOURCE_DIVIDER_28, TIMERA_CLOCKSOURCE_DIVIDER_3, TIMERA_CLOCKSOURCE_DIVIDER_32, TIMERA_CLOCKSOURCE_DIVIDER_4, TIMERA_CLOCKSOURCE_DIVIDER_40, TIMERA_CLOCKSOURCE_DIVIDER_48, TIMERA_CLOCKSOURCE_DIVIDER_5, TIMERA_CLOCKSOURCE_DIVIDER_56, TIMERA_CLOCKSOURCE_DIVIDER_6, TIMERA_CLOCKSOURCE_DIVIDER_64, TIMERA_CLOCKSOURCE_DIVIDER_7, TIMERA_CLOCKSOURCE_DIVIDER_8, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_CONTINUOUS_MODE, TIMERA_DO_CLEAR, TIMERA_SKIP_CLEAR, TIMERA_STOP_MODE, TIMERA_TAIE_INTERRUPT_DISABLE, and TIMERA_TAIE_INTERRUPT_ENABLE.

void TimerA_configureUpMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerPeriod,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  captureCompareInterruptEnable_CCR0_CCIE,
unsigned int  timerClear 
)

Configures TimerA in up mode.

Parameters:
baseAddressis the base address of the TimerA module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerPeriodis the specified TimerA period. This is the value that gets written into the CCR0. Limited to 16 bits[unsigned int]
timerInterruptEnable_TAIEis to enable or disable TimerA interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE and TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
captureCompareInterruptEnable_CCR0_CCIEis to enable or disable TimerA CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value]
timerCleardecides if TimerA clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified registers are TAxCTL, TAxCCR0, TAxCCTL0

This API does not start the timer. Timer needs to be started when required using the TimerA_startCounter API.

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CCIE_CCR0_INTERRUPT_ENABLE, TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_DO_CLEAR, TIMERA_SKIP_CLEAR, TIMERA_STOP_MODE, TIMERA_TAIE_INTERRUPT_ENABLE, and TIMERA_UP_MODE.

void TimerA_configureUpDownMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerPeriod,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  captureCompareInterruptEnable_CCR0_CCIE,
unsigned int  timerClear 
)

Configures TimerA in up down mode.

Parameters:
baseAddressis the base address of the TimerA module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerPeriodis the specified TimerA period
timerInterruptEnable_TAIEis to enable or disable TimerA interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
captureCompareInterruptEnable_CCR0_CCIEis to enable or disable TimerA CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value]
timerCleardecides if TimerA clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified registers are TAxCTL, TAxCCR0, TAxCCTL0

This API does not start the timer. Timer needs to be started when required using the TimerA_startCounter API.

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CCIE_CCR0_INTERRUPT_ENABLE, TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_DO_CLEAR, TIMERA_SKIP_CLEAR, TIMERA_STOP_MODE, TIMERA_TAIE_INTERRUPT_ENABLE, and TIMERA_UPDOWN_MODE.

void TimerA_startContinuousMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  timerClear 
)

Starts timer in continuous mode.

DEPRPECATED - Replaced by TimerA_configureContinuousMode and TimerA_startCounter API

Parameters:
baseAddressis the base address of the Timer module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerInterruptEnable_TAIEis to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
timerCleardecides if timer clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified reister is TAxCTL

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_DIVIDER_1, TIMERA_CLOCKSOURCE_DIVIDER_10, TIMERA_CLOCKSOURCE_DIVIDER_12, TIMERA_CLOCKSOURCE_DIVIDER_14, TIMERA_CLOCKSOURCE_DIVIDER_16, TIMERA_CLOCKSOURCE_DIVIDER_2, TIMERA_CLOCKSOURCE_DIVIDER_20, TIMERA_CLOCKSOURCE_DIVIDER_24, TIMERA_CLOCKSOURCE_DIVIDER_28, TIMERA_CLOCKSOURCE_DIVIDER_3, TIMERA_CLOCKSOURCE_DIVIDER_32, TIMERA_CLOCKSOURCE_DIVIDER_4, TIMERA_CLOCKSOURCE_DIVIDER_40, TIMERA_CLOCKSOURCE_DIVIDER_48, TIMERA_CLOCKSOURCE_DIVIDER_5, TIMERA_CLOCKSOURCE_DIVIDER_56, TIMERA_CLOCKSOURCE_DIVIDER_6, TIMERA_CLOCKSOURCE_DIVIDER_64, TIMERA_CLOCKSOURCE_DIVIDER_7, TIMERA_CLOCKSOURCE_DIVIDER_8, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_CONTINUOUS_MODE, TIMERA_DO_CLEAR, TIMERA_SKIP_CLEAR, TIMERA_TAIE_INTERRUPT_DISABLE, TIMERA_TAIE_INTERRUPT_ENABLE, and TIMERA_UPDOWN_MODE.

Referenced by TimerA_startContinousMode().

void TimerA_startContinousMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  timerClear 
)

DEPRECATED- Spelling Error Fixed Starts timer in continuous mode.

Parameters:
baseAddressis the base address of the Timer module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerInterruptEnable_TAIEis to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
timerCleardecides if timer clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified reister is TAxCTL

Returns:
None

References TimerA_startContinuousMode().

void TimerA_startUpMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerPeriod,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  captureCompareInterruptEnable_CCR0_CCIE,
unsigned int  timerClear 
)

Starts timer in up mode.

DEPRPECATED - Replaced by TimerA_configureUpMode and TimerA_startCounter API

Parameters:
baseAddressis the base address of the Timer module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerPeriodis the specified timer period. This is the value that gets written into the CCR0. Limited to 16 bits[unsigned int]
timerInterruptEnable_TAIEis to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE and TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
captureCompareInterruptEnable_CCR0_CCIEis to enable or disable timer CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value]
timerCleardecides if timer clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified registers are TAxCTL, TAxCCR0, TAxCCTL0

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CCIE_CCR0_INTERRUPT_ENABLE, TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_DO_CLEAR, TIMERA_SKIP_CLEAR, TIMERA_TAIE_INTERRUPT_ENABLE, TIMERA_UP_MODE, and TIMERA_UPDOWN_MODE.

void TimerA_startUpDownMode ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerPeriod,
unsigned int  timerInterruptEnable_TAIE,
unsigned int  captureCompareInterruptEnable_CCR0_CCIE,
unsigned int  timerClear 
)

Starts timer in up down mode.

DEPRPECATED - Replaced by TimerA_configureUpDownMode and TimerA_startCounter API

Parameters:
baseAddressis the base address of the Timer module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 [Default value] TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerPeriodis the specified timer period
timerInterruptEnable_TAIEis to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value]
captureCompareInterruptEnable_CCR0_CCIEis to enable or disable timer CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value]
timerCleardecides if timer clock divider, count direction, count need to be reset. Valid values are TIMERA_DO_CLEAR TIMERA_SKIP_CLEAR [Default value]

Modified registers are TAxCTL, TAxCCR0, TAxCCTL0

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CCIE_CCR0_INTERRUPT_ENABLE, TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_DO_CLEAR, TIMERA_SKIP_CLEAR, TIMERA_TAIE_INTERRUPT_ENABLE, and TIMERA_UPDOWN_MODE.

void TimerA_initCapture ( unsigned int  baseAddress,
unsigned int  captureRegister,
unsigned int  captureMode,
unsigned int  captureInputSelect,
unsigned short  synchronizeCaptureSource,
unsigned short  captureInterruptEnable,
unsigned int  captureOutputMode 
)

Initializes Capture Mode

Parameters:
baseAddressis the base address of the Timer module.
captureRegisterselects the Capture register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
captureModeis the capture mode selected. Valid values are TIMERA_CAPTUREMODE_NO_CAPTURE [Default value] TIMERA_CAPTUREMODE_RISING_EDGE TIMERA_CAPTUREMODE_FALLING_EDGE TIMERA_CAPTUREMODE_RISING_AND_FALLING_EDGE
captureInputSelectdecides the Input Select TIMERA_CAPTURE_INPUTSELECT_CCIxA [Default value] TIMERA_CAPTURE_INPUTSELECT_CCIxB TIMERA_CAPTURE_INPUTSELECT_GND TIMERA_CAPTURE_INPUTSELECT_Vcc
synchronizeCaptureSourcedecides if capture source should be synchronized with timer clock Valid values are TIMERA_CAPTURE_ASYNCHRONOUS [Default value] TIMERA_CAPTURE_SYNCHRONOUS
captureInterruptEnableis to enable or disable timer captureComapre interrupt. Valid values are TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE [Default value] TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE
captureOutputModespecifies the ouput mode. Valid values are TIMERA_OUTPUTMODE_OUTBITVALUE [Default value], TIMERA_OUTPUTMODE_SET, TIMERA_OUTPUTMODE_TOGGLE_RESET, TIMERA_OUTPUTMODE_SET_RESET TIMERA_OUTPUTMODE_TOGGLE, TIMERA_OUTPUTMODE_RESET, TIMERA_OUTPUTMODE_TOGGLE_SET, TIMERA_OUTPUTMODE_RESET_SET

Modified register is TAxCCTLn

Returns:
None

References ASSERT, HWREG, TIMERA_CAPTURE_ASYNCHRONOUS, TIMERA_CAPTURE_INPUTSELECT_CCIxA, TIMERA_CAPTURE_INPUTSELECT_CCIxB, TIMERA_CAPTURE_INPUTSELECT_GND, TIMERA_CAPTURE_INPUTSELECT_Vcc, TIMERA_CAPTURE_SYNCHRONOUS, TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE, TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, TIMERA_CAPTURECOMPARE_REGISTER_6, TIMERA_CAPTUREMODE_FALLING_EDGE, TIMERA_CAPTUREMODE_NO_CAPTURE, TIMERA_CAPTUREMODE_RISING_AND_FALLING_EDGE, TIMERA_CAPTUREMODE_RISING_EDGE, TIMERA_DO_CLEAR, TIMERA_OUTPUTMODE_OUTBITVALUE, TIMERA_OUTPUTMODE_RESET, TIMERA_OUTPUTMODE_RESET_SET, TIMERA_OUTPUTMODE_SET, TIMERA_OUTPUTMODE_SET_RESET, TIMERA_OUTPUTMODE_TOGGLE, TIMERA_OUTPUTMODE_TOGGLE_RESET, TIMERA_OUTPUTMODE_TOGGLE_SET, and TIMERA_TAIE_INTERRUPT_ENABLE.

void TimerA_initCompare ( unsigned int  baseAddress,
unsigned int  compareRegister,
unsigned short  compareInterruptEnable,
unsigned int  compareOutputMode,
unsigned int  compareValue 
)

Initializes Compare Mode

Parameters:
baseAddressis the base address of the Timer module.
compareRegisterselects the Capture register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
compareInterruptEnableis to enable or disable timer captureComapre interrupt. Valid values are TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE and TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE [Default value]
compareOutputModespecifies the ouput mode. Valid values are TIMERA_OUTPUTMODE_OUTBITVALUE [Default value], TIMERA_OUTPUTMODE_SET, TIMERA_OUTPUTMODE_TOGGLE_RESET, TIMERA_OUTPUTMODE_SET_RESET TIMERA_OUTPUTMODE_TOGGLE, TIMERA_OUTPUTMODE_RESET, TIMERA_OUTPUTMODE_TOGGLE_SET, TIMERA_OUTPUTMODE_RESET_SET
compareValueis the count to be compared with in compare mode

Modified register is TAxCCTLn and TAxCCRn

Returns:
None

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE, TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, TIMERA_CAPTURECOMPARE_REGISTER_6, TIMERA_OUTPUTMODE_OUTBITVALUE, TIMERA_OUTPUTMODE_RESET, TIMERA_OUTPUTMODE_RESET_SET, TIMERA_OUTPUTMODE_SET, TIMERA_OUTPUTMODE_SET_RESET, TIMERA_OUTPUTMODE_TOGGLE, TIMERA_OUTPUTMODE_TOGGLE_RESET, and TIMERA_OUTPUTMODE_TOGGLE_SET.

void TimerA_enableInterrupt ( unsigned int  baseAddress)

Enable timer interrupt

Parameters:
baseAddressis the base address of the Timer module.

Modified register is TAxCTL

Returns:
None

References HWREG, and HWREGB.

void TimerA_disableInterrupt ( unsigned int  baseAddress)

Disable timer interrupt

Parameters:
baseAddressis the base address of the Timer module.

Modified register is TAxCTL

Returns:
None

References HWREG.

unsigned long TimerA_getInterruptStatus ( unsigned int  baseAddress)

Get timer interrupt status

Parameters:
baseAddressis the base address of the Timer module.
Returns:
unsigned long. Return interrupt status. Valid values are TIMERA_INTERRUPT_PENDING TIMERA_INTERRUPT_NOT_PENDING

References HWREG.

void TimerA_enableCaptureCompareInterrupt ( unsigned int  baseAddress,
unsigned int  captureCompareRegister 
)

Enable capture compare interrupt

Parameters:
baseAddressis the base address of the Timer module.
captureCompareRegisteris the selected capture compare regsiter

Modified register is TAxCCTLn

Returns:
None

References ASSERT, HWREG, HWREGB, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, and TIMERA_CAPTURECOMPARE_REGISTER_6.

void TimerA_disableCaptureCompareInterrupt ( unsigned int  baseAddress,
unsigned int  captureCompareRegister 
)

Disable capture compare interrupt

Parameters:
baseAddressis the base address of the Timer module.
captureCompareRegisteris the selected capture compare regsiter

Modified register is TAxCCTLn

Returns:
None

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, and TIMERA_CAPTURECOMPARE_REGISTER_6.

unsigned long TimerA_getCaptureCompareInterruptStatus ( unsigned int  baseAddress,
unsigned int  captureCompareRegister,
unsigned int  mask 
)

Return capture compare interrupt status

Parameters:
baseAddressis the base address of the Timer module.
captureCompareRegisteris the selected capture compare register
maskis the mask for the interrupt status Valid values is and OR of TIMERA_CAPTURE_OVERFLOW, TIMERA_CAPTURECOMPARE_INTERRUPT_FLAG
Returns:
unsigned long. The mask of the set flags.

References HWREG.

void TimerA_clear ( unsigned int  baseAddress)

Reset/Clear the timer clock divider, count direction, count

Parameters:
baseAddressis the base address of the Timer module.

Modified register is TAxCTL

Returns:
None

References HWREG.

unsigned short TimerA_getSynchronizedCaptureCompareInput ( unsigned int  baseAddress,
unsigned int  captureCompareRegister,
unsigned short  synchronized 
)

Get synchrnozied capturecompare input

Parameters:
baseAddressis the base address of the Timer module.
captureRegisterselects the Capture register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
synchronizedis to select type of capture compare input. Valid values are TIMERA_READ_CAPTURE_COMPARE_INPUT TIMERA_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT
Returns:
TIMERA_CAPTURECOMPARE_INPUT_HIGH or TIMERA_CAPTURECOMPARE_INPUT_LOW

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_INPUT_HIGH, TIMERA_CAPTURECOMPARE_INPUT_LOW, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, TIMERA_CAPTURECOMPARE_REGISTER_6, TIMERA_READ_CAPTURE_COMPARE_INPUT, and TIMERA_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT.

unsigned char TimerA_getOutputForOutputModeOutBitValue ( unsigned int  baseAddress,
unsigned int  captureCompareRegister 
)

Get ouput bit for output mode

Parameters:
baseAddressis the base address of the Timer module.
captureRegisterselects the Capture register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
Returns:
TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH or TIMERA_OUTPUTMODE_OUTBITVALUE_LOW

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, TIMERA_CAPTURECOMPARE_REGISTER_6, TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH, and TIMERA_OUTPUTMODE_OUTBITVALUE_LOW.

unsigned int TimerA_getCaptureCompareCount ( unsigned int  baseAddress,
unsigned int  captureCompareRegister 
)

Get current capturecompare count

Parameters:
baseAddressis the base address of the Timer module.
captureRegisterselects the Capture register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
Returns:
current count as unsigned int

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, and TIMERA_CAPTURECOMPARE_REGISTER_6.

void TimerA_setOutputForOutputModeOutBitValue ( unsigned int  baseAddress,
unsigned int  captureCompareRegister,
unsigned char  outputModeOutBitValue 
)

Set ouput bit for output mode

Parameters:
baseAddressis the base address of the Timer module.
captureCompareRegisterselects the Capture register being used. are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
outputModeOutBitValueisthe value to be set for out bit Valid values are TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH TIMERA_OUTPUTMODE_OUTBITVALUE_LOW

Modified register is TAxCCTLn

Returns:
None

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, TIMERA_CAPTURECOMPARE_REGISTER_6, TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH, and TIMERA_OUTPUTMODE_OUTBITVALUE_LOW.

void TimerA_generatePWM ( unsigned int  baseAddress,
unsigned int  clockSource,
unsigned int  clockSourceDivider,
unsigned int  timerPeriod,
unsigned int  compareRegister,
unsigned int  compareOutputMode,
unsigned int  dutyCycle 
)

Generate a PWM with timer running in up down mode

Parameters:
baseAddressis the base address of the Timer module.
clockSourceselects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK
clockSourceDivideris the divider for Clock source. Valid values are TIMERA_CLOCKSOURCE_DIVIDER_1 TIMERA_CLOCKSOURCE_DIVIDER_2 TIMERA_CLOCKSOURCE_DIVIDER_4 TIMERA_CLOCKSOURCE_DIVIDER_8 TIMERA_CLOCKSOURCE_DIVIDER_3 TIMERA_CLOCKSOURCE_DIVIDER_5 TIMERA_CLOCKSOURCE_DIVIDER_6 TIMERA_CLOCKSOURCE_DIVIDER_7 TIMERA_CLOCKSOURCE_DIVIDER_10 TIMERA_CLOCKSOURCE_DIVIDER_12 TIMERA_CLOCKSOURCE_DIVIDER_14 TIMERA_CLOCKSOURCE_DIVIDER_16 TIMERA_CLOCKSOURCE_DIVIDER_20 TIMERA_CLOCKSOURCE_DIVIDER_24 TIMERA_CLOCKSOURCE_DIVIDER_28 TIMERA_CLOCKSOURCE_DIVIDER_32 TIMERA_CLOCKSOURCE_DIVIDER_40 TIMERA_CLOCKSOURCE_DIVIDER_48 TIMERA_CLOCKSOURCE_DIVIDER_56 TIMERA_CLOCKSOURCE_DIVIDER_64
timerPeriodselects the desired timer period
compareRegisterselects the compare register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
compareOutputModespecifies the ouput mode. Valid values are TIMERA_OUTPUTMODE_OUTBITVALUE, TIMERA_OUTPUTMODE_SET, TIMERA_OUTPUTMODE_TOGGLE_RESET, TIMERA_OUTPUTMODE_SET_RESET TIMERA_OUTPUTMODE_TOGGLE, TIMERA_OUTPUTMODE_RESET, TIMERA_OUTPUTMODE_TOGGLE_SET, TIMERA_OUTPUTMODE_RESET_SET
dutyCyclespecifies the dutycycle for the generated waveform

Modified registers are TAxCTL, TAxCCR0, TAxCCTL0,TAxCCTLn

Returns:
None

References ASSERT, HWREG, privateTimerAProcessClockSourceDivider(), TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, TIMERA_CAPTURECOMPARE_REGISTER_6, TIMERA_CLOCKSOURCE_ACLK, TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMERA_CLOCKSOURCE_SMCLK, TIMERA_DO_CLEAR, TIMERA_OUTPUTMODE_OUTBITVALUE, TIMERA_OUTPUTMODE_RESET, TIMERA_OUTPUTMODE_RESET_SET, TIMERA_OUTPUTMODE_SET, TIMERA_OUTPUTMODE_SET_RESET, TIMERA_OUTPUTMODE_TOGGLE, TIMERA_OUTPUTMODE_TOGGLE_RESET, TIMERA_OUTPUTMODE_TOGGLE_SET, TIMERA_TAIE_INTERRUPT_ENABLE, TIMERA_UP_MODE, and TIMERA_UPDOWN_MODE.

void TimerA_stop ( unsigned int  baseAddress)

Stops the timer

Parameters:
baseAddressis the base address of the Timer module.

Modified registers are TAxCTL

Returns:
None

References HWREG.

void TimerA_setCompareValue ( unsigned int  baseAddress,
unsigned int  compareRegister,
unsigned int  compareValue 
)

Sets the value of the capture-compare register

Parameters:
baseAddressis the base address of the Timer module.
compareRegisterselects the Capture register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used
compareValueis the count to be compared with in compare mode

Modified register is TAxCCRn

Returns:
None

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, and TIMERA_CAPTURECOMPARE_REGISTER_6.

void TimerA_clearTimerInterruptFlag ( unsigned int  baseAddress)

Clears the Timer TAIFG interrupt flag

Parameters:
baseAddressis the base address of the Timer module.

Modified bits are TAIFG og TAxCTL register

Returns:
None

References HWREGB.

void TimerA_clearCaptureCompareInterruptFlag ( unsigned int  baseAddress,
unsigned int  captureCompareRegister 
)

Clears the capture-compare interrupt flag

Parameters:
baseAddressis the base address of the Timer module.
captureCompareRegisterselects the Capture-compare register being used. Valid values are TIMERA_CAPTURECOMPARE_REGISTER_0 TIMERA_CAPTURECOMPARE_REGISTER_1 TIMERA_CAPTURECOMPARE_REGISTER_2 TIMERA_CAPTURECOMPARE_REGISTER_3 TIMERA_CAPTURECOMPARE_REGISTER_4 TIMERA_CAPTURECOMPARE_REGISTER_5 TIMERA_CAPTURECOMPARE_REGISTER_6 Refer datasheet to ensure the device has the capture compare register being used

Modified bits are CCIFG of TAxCCTLn register

Returns:
None

References ASSERT, HWREG, TIMERA_CAPTURECOMPARE_REGISTER_0, TIMERA_CAPTURECOMPARE_REGISTER_1, TIMERA_CAPTURECOMPARE_REGISTER_2, TIMERA_CAPTURECOMPARE_REGISTER_3, TIMERA_CAPTURECOMPARE_REGISTER_4, TIMERA_CAPTURECOMPARE_REGISTER_5, and TIMERA_CAPTURECOMPARE_REGISTER_6.


Copyright 2012, Texas Instruments Incorporated