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

RTOS/AM5726: Timer PWM trigger on overflow and match

$
0
0

Part Number:AM5726

Tool/software: TI-RTOS

SDK: processor_sdk_rtos_am57xx_5_00_00_15

Hello,

We want to use timer 15 processor AM5726 in PWM with Trigger on overflow and match mode

When we use settings tclr.trg = 0x1 and tclr.pt = 1 - all work fine(we see signal with period 2 s and duty ratio = 50%)

When we use settings tclr.trg = 0x2 and tclr.pt = 1 - not work( we don't see anything periodic signal)

The example source cod is given below:

Void myIsr15(Void)
{
    Log_info0("myIsr15");
}

static void TimerPRCMConfigure(void)
{
    HW_WR_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER3_TIMER15_CLKCTRL, 0x2);

    while ((HW_RD_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER3_TIMER15_CLKCTRL) & (0x00030000)) != 0x0) ;
}

Int main() {
    Error_Block eb;
    Error_init(&eb);


TimerPRCMConfigure(); 
Timer_Handle timerHandle; 
Timer_Params timerParams; 
Timer_Params_init(&timerParams); 
timerParams.period = 1000000; /* 1.0 s */ 
timerParams.periodType = Timer_PeriodType_MICROSECS; 
timerParams.arg = 1; 
timerParams.runMode = Timer_RunMode_CONTINUOUS; 
timerParams.tclr.pt = 0x1;//pwm Toggle modulation timer
Params.tclr.trg = 0x2;//pwm Trigger on overflow and match 
timerParams.tclr.gpocfg = 0;//pwm 
timerParams.tmar = 0xFF67697F; 
timerParams.tclr.ce = 0x1 ; 
timerParams.extFreq.lo = 20000000; 
timerParams.extFreq.hi = 0; 
timerHandle = Timer_create(14, Isr15, &timerParams, &eb);

BIOS_start();    /* does not return */
    return(0);
}

Might you tell me what to do to make the timer 15 work correctly


Viewing all articles
Browse latest Browse all 17527

Trending Articles



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