This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Timer6 can't work stable

Genius 13655 points
Part Number: AM5728
Other Parts Discussed in Thread: AM5718, SYSBIOS

Hello Champs,

HW: customer own AM5718 board
SW: am57xx_06_03_02_08 SDK

Customer can't use Timer6, but he can use Timer5. 

1. How to trigger the Timer6?

2. What timer can be used on AM5718?

Timer6 callback 
Clock_Tick and print Clock_getTicks() in every task, then the timer6 is not stable in some time. Below is the log

[ 28.000] led 28000...
[ 29.000] led 29000...
[ 30.000] led 30000...
[ 31.000] led 31000...
[ 32.000] led 32000...
[ 33.000] led 33000...
[ 34.000] led 34000...
[ 35.000] led 35000...
[ 36.000] led 36000...
[ 37.000] led 37000...
[ 38.000] led 38000...
[ 39.000] led 39000...
[ 40.000] led 40000...
[ 41.000] led 41000...
[ 42.000] led 42000...
[ 43.000] led 43000...
[ 44.003] led 44003...
[ 45.005] led 45005...
[ 46.007] led 46007...
[ 47.009] led 47009...
[ 48.011] led 48011...
[ 49.013] led 49013...
[ 50.015] led 50015...
[ 51.017] led 51017...
[ 52.019] led 52019...
[ 53.021] led 53021...
[ 54.023] led 54023...
[ 55.025] led 55025...
[ 56.027] led 56027...
[ 57.029] led 57029...
[ 58.031] led 58031...
[ 59.033] led 59033...
[ 60.035] led 60035...


configuration code in .cfg

var timer0Params = new Timer.Params();
timer0Params.instance.name = "timer0";
timer0Params.period = 1000;
timer0Params.periodType = xdc.module("ti.sysbios.interfaces.ITimer").PeriodType_MICROSECS;
timer0Params.extFreq.lo = 20000000;
timer0Params.runMode = xdc.module("ti.sysbios.interfaces.ITimer").RunMode_CONTINUOUS;
Program.global.timer0 = Timer.create(4, "&TimerFxn", timer0Params);
Clock.tickSource = Clock.TickSource_USER;
Clock.tickPeriod = 1000;
var timer1Params = new Timer.Params();
timer1Params.instance.name = "timer1";
timer1Params.period = 1000;
timer1Params.periodType = xdc.module("ti.sysbios.interfaces.ITimer").PeriodType_MICROSECS;
timer1Params.extFreq.lo = 20000000;
timer0Params.runMode = xdc.module("ti.sysbios.interfaces.ITimer").RunMode_CONTINUOUS;
Program.global.timer1 = Timer.create(5, "&clockFxn", timer1Params);
ti_sysbios_timers_dmtimer_Timer.anyMask = 48;
ti_sysbios_timers_dmtimer_Timer.intFreq.lo = 20000000;
ti_sysbios_timers_dmtimer_Timer.timerSettings[4].intNum = 12;
ti_sysbios_timers_dmtimer_Timer.timerSettings[5].intNum = 13;

The callback clock function:

void clockFxn(UArg arg)
{
    Clock_tick();
}

He has referenced below links

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_46_04_53/exports/bios_6_46_04_53/docs/cdoc/ti/sysbios/family/shared/vayu/TimerSupport.html#avail.Mask

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/719876/rtos-am5728-timer-interrupt-instability/2662506?tisearch=e2e-sitesearch&keymatch=Timer%20instability#2662506

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_40_01_15/exports/bios_6_40_01_15/docs/cdoc/ti/sysbios/timers/dmtimer/doc-files/TimerTables.html

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/634017/rtos-am5728-timer-control-from-dsp

Thanks.
Rgds
Shine