Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

AM1808 Timer : Requesting 32bit Unchained mode example code

$
0
0

Hi

I want to use eight 32bit unchained timer in my application.

I tried in timer 0.  TIM34 operate well, but TIM12 is in reset . ( TIM12RS in TGCR is 0)

Send me example source code. Thanks.

 The following is  my initial code for Timer0  TIM12 and TIM34.

=====================================================

 TimerIntDisable(SOC_TMR_0_REGS, TMR_INT_TMR12_NON_CAPT_MODE | TMR_INT_TMR34_NON_CAPT_MODE);
 TimerDisable(SOC_TMR_0_REGS, TMR_TIMER12 | TMR_TIMER34); //TIMER stop.
 HWREG(SOC_TMR_0_REGS + TMR_TIM12) = 0x0;
 HWREG(SOC_TMR_0_REGS + TMR_TIM34) = 0x0; //timer counter reset
 period=TIMER64P0_34_TIMER_1US_CNT*1000*1000;
 Timer64P23TIM34SetUp32Bit(SOC_TMR_0_REGS,TIMER64P0_PSC34_DIVISOR-1,period);
 IntrChannelMap(SYS_INT_TINT34_0,TIMERP0_34_IRQ_CH,Timer64P0_34Isr);
// TimerIntEnable(SOC_TMR_3_REGS, TMR_INT_TMR34_NON_CAPT_MODE);
// TimerEnable(SOC_TMR_3_REGS, TMR_TIMER34, TMR_ENABLE_CONT); //TIMER start.

 TimerIntDisable(SOC_TMR_0_REGS, TMR_INT_TMR12_NON_CAPT_MODE);
 TimerDisable(SOC_TMR_0_REGS, TMR_TIMER12); //TIMER stop.
 HWREG(SOC_TMR_0_REGS + TMR_TIM12) = 0x0; //timer counter reset
 period=TIMER64P0_12_TIMER_1US_CNT*1000*1000;

    TimerConfigure(SOC_TMR_0_REGS, TMR_CFG_32BIT_UNCH_CLK_BOTH_INT ); //
    TimerPeriodSet(SOC_TMR_0_REGS, TMR_TIMER12, period);
   IntrChannelMap(SYS_INT_TINT12_0,TIMERP0_12_IRQ_CH,Timer64P0_12Isr);

  


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>