Go to the source code of this file.
Defines | |
#define | __MSP430_HAS_TxA7__ |
#define | TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK TASSEL__TACLK |
#define | TIMERA_CLOCKSOURCE_ACLK TASSEL__ACLK |
#define | TIMERA_CLOCKSOURCE_SMCLK TASSEL__SMCLK |
#define | TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK TASSEL__INCLK |
#define | TIMERA_CLOCKSOURCE_DIVIDER_1 0x01 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_2 0x02 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_4 0x04 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_8 0x08 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_3 0x03 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_5 0x05 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_6 0x06 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_7 0x07 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_10 0x0A |
#define | TIMERA_CLOCKSOURCE_DIVIDER_12 0x0C |
#define | TIMERA_CLOCKSOURCE_DIVIDER_14 0x0E |
#define | TIMERA_CLOCKSOURCE_DIVIDER_16 0x10 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_20 0x14 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_24 0x18 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_28 0x1C |
#define | TIMERA_CLOCKSOURCE_DIVIDER_32 0x20 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_40 0x28 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_48 0x30 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_56 0x38 |
#define | TIMERA_CLOCKSOURCE_DIVIDER_64 0x40 |
#define | TIMERA_DO_CLEAR TACLR |
#define | TIMERA_SKIP_CLEAR 0x00 |
#define | TIMERA_CAPTURECOMPARE_INPUT SCCI |
#define | TIMERA_SYNCHRONIZED_CAPTURECOMPARE_INPUT CCI |
#define | TIMERA_CAPTURECOMPARE_INPUT_HIGH 0x01 |
#define | TIMERA_CAPTURECOMPARE_INPUT_LOW 0x00 |
#define | TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH OUT |
#define | TIMERA_OUTPUTMODE_OUTBITVALUE_LOW 0x00 |
#define | TIMERA_CAPTURE_OVERFLOW COV |
#define | TIMERA_CAPTURECOMPARE_INTERRUPT_FLAG CCIFG |
#define | TIMERA_TAIE_INTERRUPT_ENABLE TAIE |
#define | TIMERA_TAIE_INTERRUPT_DISABLE 0x00 |
#define | TIMERA_CCIE_CCR0_INTERRUPT_ENABLE CCIE |
#define | TIMERA_CCIE_CCR0_INTERRUPT_DISABLE 0x00 |
#define | TIMERA_STOP_MODE MC_0 |
#define | TIMERA_UP_MODE MC_1 |
#define | TIMERA_CONTINUOUS_MODE MC_2 |
#define | TIMERA_UPDOWN_MODE MC_3 |
#define | TIMERA_CAPTURECOMPARE_REGISTER_0 0x02 |
#define | TIMERA_CAPTURECOMPARE_REGISTER_1 0x04 |
#define | TIMERA_CAPTURECOMPARE_REGISTER_2 0x06 |
#define | TIMERA_CAPTURECOMPARE_REGISTER_3 0x08 |
#define | TIMERA_CAPTURECOMPARE_REGISTER_4 0x0A |
#define | TIMERA_CAPTURECOMPARE_REGISTER_5 0x0C |
#define | TIMERA_CAPTURECOMPARE_REGISTER_6 0x0E |
#define | TIMERA_OUTPUTMODE_OUTBITVALUE OUTMOD_0 |
#define | TIMERA_OUTPUTMODE_SET OUTMOD_1 |
#define | TIMERA_OUTPUTMODE_TOGGLE_RESET OUTMOD_2 |
#define | TIMERA_OUTPUTMODE_SET_RESET OUTMOD_3 |
#define | TIMERA_OUTPUTMODE_TOGGLE OUTMOD_4 |
#define | TIMERA_OUTPUTMODE_RESET OUTMOD_5 |
#define | TIMERA_OUTPUTMODE_TOGGLE_SET OUTMOD_6 |
#define | TIMERA_OUTPUTMODE_RESET_SET OUTMOD_7 |
#define | TIMERA_CAPTUREMODE_NO_CAPTURE CM_0 |
#define | TIMERA_CAPTUREMODE_RISING_EDGE CM_1 |
#define | TIMERA_CAPTUREMODE_FALLING_EDGE CM_2 |
#define | TIMERA_CAPTUREMODE_RISING_AND_FALLING_EDGE CM_3 |
#define | TIMERA_CAPTURE_ASYNCHRONOUS 0x00 |
#define | TIMERA_CAPTURE_SYNCHRONOUS SCS |
#define | TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE CCIE |
#define | TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE 0x00 |
#define | TIMERA_CAPTURE_INPUTSELECT_CCIxA CCIS_0 |
#define | TIMERA_CAPTURE_INPUTSELECT_CCIxB CCIS_1 |
#define | TIMERA_CAPTURE_INPUTSELECT_GND CCIS_2 |
#define | TIMERA_CAPTURE_INPUTSELECT_Vcc CCIS_3 |
#define | TIMERA_INTERRUPT_NOT_PENDING 0x00 |
#define | TIMERA_INTERRUPT_PENDING 0x01 |
#define | TIMERA_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT SCCI |
#define | TIMERA_READ_CAPTURE_COMPARE_INPUT CCI |
Functions | |
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) |
#define __MSP430_HAS_TxA7__ |
#define TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK TASSEL__TACLK |
#define TIMERA_CLOCKSOURCE_ACLK TASSEL__ACLK |
#define TIMERA_CLOCKSOURCE_SMCLK TASSEL__SMCLK |
#define TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK TASSEL__INCLK |
#define TIMERA_CLOCKSOURCE_DIVIDER_1 0x01 |
#define TIMERA_CLOCKSOURCE_DIVIDER_2 0x02 |
#define TIMERA_CLOCKSOURCE_DIVIDER_4 0x04 |
#define TIMERA_CLOCKSOURCE_DIVIDER_8 0x08 |
#define TIMERA_CLOCKSOURCE_DIVIDER_3 0x03 |
#define TIMERA_CLOCKSOURCE_DIVIDER_5 0x05 |
#define TIMERA_CLOCKSOURCE_DIVIDER_6 0x06 |
#define TIMERA_CLOCKSOURCE_DIVIDER_7 0x07 |
#define TIMERA_CLOCKSOURCE_DIVIDER_10 0x0A |
#define TIMERA_CLOCKSOURCE_DIVIDER_12 0x0C |
#define TIMERA_CLOCKSOURCE_DIVIDER_14 0x0E |
#define TIMERA_CLOCKSOURCE_DIVIDER_16 0x10 |
#define TIMERA_CLOCKSOURCE_DIVIDER_20 0x14 |
#define TIMERA_CLOCKSOURCE_DIVIDER_24 0x18 |
#define TIMERA_CLOCKSOURCE_DIVIDER_28 0x1C |
#define TIMERA_CLOCKSOURCE_DIVIDER_32 0x20 |
#define TIMERA_CLOCKSOURCE_DIVIDER_40 0x28 |
#define TIMERA_CLOCKSOURCE_DIVIDER_48 0x30 |
#define TIMERA_CLOCKSOURCE_DIVIDER_56 0x38 |
#define TIMERA_CLOCKSOURCE_DIVIDER_64 0x40 |
#define TIMERA_DO_CLEAR TACLR |
#define TIMERA_SKIP_CLEAR 0x00 |
#define TIMERA_CAPTURECOMPARE_INPUT SCCI |
#define TIMERA_SYNCHRONIZED_CAPTURECOMPARE_INPUT CCI |
#define TIMERA_CAPTURECOMPARE_INPUT_HIGH 0x01 |
Referenced by TimerA_getSynchronizedCaptureCompareInput().
#define TIMERA_CAPTURECOMPARE_INPUT_LOW 0x00 |
Referenced by TimerA_getSynchronizedCaptureCompareInput().
#define TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH OUT |
Referenced by TimerA_getOutputForOutputModeOutBitValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_OUTPUTMODE_OUTBITVALUE_LOW 0x00 |
Referenced by TimerA_getOutputForOutputModeOutBitValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURE_OVERFLOW COV |
#define TIMERA_CAPTURECOMPARE_INTERRUPT_FLAG CCIFG |
#define TIMERA_TAIE_INTERRUPT_ENABLE TAIE |
#define TIMERA_TAIE_INTERRUPT_DISABLE 0x00 |
Referenced by TimerA_configureContinuousMode(), and TimerA_startContinuousMode().
#define TIMERA_CCIE_CCR0_INTERRUPT_ENABLE CCIE |
Referenced by TimerA_configureUpDownMode(), TimerA_configureUpMode(), TimerA_startUpDownMode(), and TimerA_startUpMode().
#define TIMERA_CCIE_CCR0_INTERRUPT_DISABLE 0x00 |
#define TIMERA_STOP_MODE MC_0 |
Referenced by TimerA_configureContinuousMode(), TimerA_configureUpDownMode(), and TimerA_configureUpMode().
#define TIMERA_UP_MODE MC_1 |
Referenced by TimerA_configureUpMode(), TimerA_generatePWM(), TimerA_startCounter(), TimerA_startUpMode(), and TimerD_startCounter().
#define TIMERA_CONTINUOUS_MODE MC_2 |
#define TIMERA_UPDOWN_MODE MC_3 |
#define TIMERA_CAPTURECOMPARE_REGISTER_0 0x02 |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURECOMPARE_REGISTER_1 0x04 |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURECOMPARE_REGISTER_2 0x06 |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURECOMPARE_REGISTER_3 0x08 |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURECOMPARE_REGISTER_4 0x0A |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURECOMPARE_REGISTER_5 0x0C |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_CAPTURECOMPARE_REGISTER_6 0x0E |
Referenced by TimerA_clearCaptureCompareInterruptFlag(), TimerA_disableCaptureCompareInterrupt(), TimerA_enableCaptureCompareInterrupt(), TimerA_generatePWM(), TimerA_getCaptureCompareCount(), TimerA_getOutputForOutputModeOutBitValue(), TimerA_getSynchronizedCaptureCompareInput(), TimerA_initCapture(), TimerA_initCompare(), TimerA_setCompareValue(), and TimerA_setOutputForOutputModeOutBitValue().
#define TIMERA_OUTPUTMODE_OUTBITVALUE OUTMOD_0 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_SET OUTMOD_1 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_TOGGLE_RESET OUTMOD_2 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_SET_RESET OUTMOD_3 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_TOGGLE OUTMOD_4 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_RESET OUTMOD_5 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_TOGGLE_SET OUTMOD_6 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_OUTPUTMODE_RESET_SET OUTMOD_7 |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_CAPTUREMODE_NO_CAPTURE CM_0 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTUREMODE_RISING_EDGE CM_1 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTUREMODE_FALLING_EDGE CM_2 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTUREMODE_RISING_AND_FALLING_EDGE CM_3 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTURE_ASYNCHRONOUS 0x00 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTURE_SYNCHRONOUS SCS |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE CCIE |
Referenced by TimerA_generatePWM(), TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE 0x00 |
Referenced by TimerA_initCapture(), and TimerA_initCompare().
#define TIMERA_CAPTURE_INPUTSELECT_CCIxA CCIS_0 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTURE_INPUTSELECT_CCIxB CCIS_1 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTURE_INPUTSELECT_GND CCIS_2 |
Referenced by TimerA_initCapture().
#define TIMERA_CAPTURE_INPUTSELECT_Vcc CCIS_3 |
Referenced by TimerA_initCapture().
#define TIMERA_INTERRUPT_NOT_PENDING 0x00 |
#define TIMERA_INTERRUPT_PENDING 0x01 |
#define TIMERA_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT SCCI |
Referenced by TimerA_getSynchronizedCaptureCompareInput().
#define TIMERA_READ_CAPTURE_COMPARE_INPUT CCI |
Referenced by TimerA_getSynchronizedCaptureCompareInput().
void TimerA_startCounter | ( | unsigned int | baseAddress, |
unsigned int | timerMode | ||
) |
Starts TimerA counter
baseAddress | is the base address of the TimerA module. |
clockSource | selects 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.
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.
baseAddress | is the base address of the TimerA module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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_TAIE | is to enable or disable TimerA interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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.
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.
baseAddress | is the base address of the TimerA module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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 |
timerPeriod | is the specified TimerA period. This is the value that gets written into the CCR0. Limited to 16 bits[unsigned int] |
timerInterruptEnable_TAIE | is to enable or disable TimerA interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE and TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
captureCompareInterruptEnable_CCR0_CCIE | is to enable or disable TimerA CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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.
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.
baseAddress | is the base address of the TimerA module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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 |
timerPeriod | is the specified TimerA period |
timerInterruptEnable_TAIE | is to enable or disable TimerA interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
captureCompareInterruptEnable_CCR0_CCIE | is to enable or disable TimerA CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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.
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
baseAddress | is the base address of the Timer module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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_TAIE | is to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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
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.
baseAddress | is the base address of the Timer module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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_TAIE | is to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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
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
baseAddress | is the base address of the Timer module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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 |
timerPeriod | is the specified timer period. This is the value that gets written into the CCR0. Limited to 16 bits[unsigned int] |
timerInterruptEnable_TAIE | is to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE and TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
captureCompareInterruptEnable_CCR0_CCIE | is to enable or disable timer CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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
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
baseAddress | is the base address of the Timer module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK [Default value] TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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 |
timerPeriod | is the specified timer period |
timerInterruptEnable_TAIE | is to enable or disable timer interrupt Valid values are TIMERA_TAIE_INTERRUPT_ENABLE TIMERA_TAIE_INTERRUPT_DISABLE [Default value] |
captureCompareInterruptEnable_CCR0_CCIE | is to enable or disable timer CCR0 captureComapre interrupt. Valid values are TIMERA_CCIE_CCR0_INTERRUPT_ENABLE and TIMERA_CCIE_CCR0_INTERRUPT_DISABLE [Default value] |
timerClear | decides 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
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
baseAddress | is the base address of the Timer module. |
captureRegister | selects 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 |
captureMode | is 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 |
captureInputSelect | decides the Input Select TIMERA_CAPTURE_INPUTSELECT_CCIxA [Default value] TIMERA_CAPTURE_INPUTSELECT_CCIxB TIMERA_CAPTURE_INPUTSELECT_GND TIMERA_CAPTURE_INPUTSELECT_Vcc |
synchronizeCaptureSource | decides if capture source should be synchronized with timer clock Valid values are TIMERA_CAPTURE_ASYNCHRONOUS [Default value] TIMERA_CAPTURE_SYNCHRONOUS |
captureInterruptEnable | is to enable or disable timer captureComapre interrupt. Valid values are TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE [Default value] TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE |
captureOutputMode | specifies 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
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
baseAddress | is the base address of the Timer module. |
compareRegister | selects 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 |
compareInterruptEnable | is to enable or disable timer captureComapre interrupt. Valid values are TIMERA_CAPTURECOMPARE_INTERRUPT_ENABLE and TIMERA_CAPTURECOMPARE_INTERRUPT_DISABLE [Default value] |
compareOutputMode | specifies 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 |
compareValue | is the count to be compared with in compare mode |
Modified register is TAxCCTLn and TAxCCRn
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 | ) |
void TimerA_disableInterrupt | ( | unsigned int | baseAddress | ) |
Disable timer interrupt
baseAddress | is the base address of the Timer module. |
Modified register is TAxCTL
References HWREG.
unsigned long TimerA_getInterruptStatus | ( | unsigned int | baseAddress | ) |
Get timer interrupt status
baseAddress | is the base address of the Timer module. |
References HWREG.
void TimerA_enableCaptureCompareInterrupt | ( | unsigned int | baseAddress, |
unsigned int | captureCompareRegister | ||
) |
Enable capture compare interrupt
baseAddress | is the base address of the Timer module. |
captureCompareRegister | is the selected capture compare regsiter |
Modified register is TAxCCTLn
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
baseAddress | is the base address of the Timer module. |
captureCompareRegister | is the selected capture compare regsiter |
Modified register is TAxCCTLn
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
baseAddress | is the base address of the Timer module. |
captureCompareRegister | is the selected capture compare register |
mask | is the mask for the interrupt status Valid values is and OR of TIMERA_CAPTURE_OVERFLOW, TIMERA_CAPTURECOMPARE_INTERRUPT_FLAG |
References HWREG.
void TimerA_clear | ( | unsigned int | baseAddress | ) |
Reset/Clear the timer clock divider, count direction, count
baseAddress | is the base address of the Timer module. |
Modified register is TAxCTL
References HWREG.
unsigned short TimerA_getSynchronizedCaptureCompareInput | ( | unsigned int | baseAddress, |
unsigned int | captureCompareRegister, | ||
unsigned short | synchronized | ||
) |
Get synchrnozied capturecompare input
baseAddress | is the base address of the Timer module. |
captureRegister | selects 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 |
synchronized | is to select type of capture compare input. Valid values are TIMERA_READ_CAPTURE_COMPARE_INPUT TIMERA_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT |
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
baseAddress | is the base address of the Timer module. |
captureRegister | selects 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 |
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
baseAddress | is the base address of the Timer module. |
captureRegister | selects 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 |
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
baseAddress | is the base address of the Timer module. |
captureCompareRegister | selects 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 |
outputModeOutBitValueis | the value to be set for out bit Valid values are TIMERA_OUTPUTMODE_OUTBITVALUE_HIGH TIMERA_OUTPUTMODE_OUTBITVALUE_LOW |
Modified register is TAxCCTLn
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
baseAddress | is the base address of the Timer module. |
clockSource | selects Clock source. Valid values are TIMERA_CLOCKSOURCE_EXTERNAL_TXCLK TIMERA_CLOCKSOURCE_ACLK TIMERA_CLOCKSOURCE_SMCLK TIMERA_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK |
clockSourceDivider | is 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 |
timerPeriod | selects the desired timer period |
compareRegister | selects 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 |
compareOutputMode | specifies 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 |
dutyCycle | specifies the dutycycle for the generated waveform |
Modified registers are TAxCTL, TAxCCR0, TAxCCTL0,TAxCCTLn
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
baseAddress | is the base address of the Timer module. |
Modified registers are TAxCTL
References HWREG.
void TimerA_setCompareValue | ( | unsigned int | baseAddress, |
unsigned int | compareRegister, | ||
unsigned int | compareValue | ||
) |
Sets the value of the capture-compare register
baseAddress | is the base address of the Timer module. |
compareRegister | selects 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 |
compareValue | is the count to be compared with in compare mode |
Modified register is TAxCCRn
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
baseAddress | is the base address of the Timer module. |
Modified bits are TAIFG og TAxCTL register
References HWREGB.
void TimerA_clearCaptureCompareInterruptFlag | ( | unsigned int | baseAddress, |
unsigned int | captureCompareRegister | ||
) |
Clears the capture-compare interrupt flag
baseAddress | is the base address of the Timer module. |
captureCompareRegister | selects 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
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.