Timer_B_initUpModeParam tparam = {0}; tparam.clockSource = TIMER_B_CLOCKSOURCE_ACLK; tparam.clockSourceDivider = TIMER_B_CLOCKSOURCE_DIVIDER_32; tparam.timerPeriod = 20480; // 32 sec tparam.timerInterruptEnable_TBIE = TIMER_B_TBIE_INTERRUPT_DISABLE; tparam.captureCompareInterruptEnable_CCR0_CCIE = TIMER_B_CCIE_CCR0_INTERRUPT_ENABLE; tparam.startTimer = true; #pragma vector=TIMER0_B0_VECTOR __interrupt void TIMER0_B0_ISR(void) { //Timer_B_stop(TB0_BASE); timerFlag = 1; _nop(); }
Hi,
if i run this code it always gets stuck in
;-----------------------------------------------------------------------------
;-- default ISR handler if user does not supply
;-- simply puts device into lpm0
;-----------------------------------------------------------------------------
.sect ".text:_isr:__TI_ISR_TRAP"
.align 2
.global __TI_ISR_TRAP
__TI_ISR_TRAP:
BIS.W #(0x0010),SR
JMP __TI_ISR_TRAP
NOP ; CPU40 Compatibility NOP
Whats wrong with my ISR?
Thank you