Other Parts Discussed in Thread: AM3359, SYSBIOS
Hello,
i am using the DMTimer and Tasks with SYS/BIOS and the ICE AM3359 rev 1.0a
In the .cfg file i am using the Timer Freq. Timer.intFreq.lo = 24000000;. & Clock_tickPeriod: 1000
Before i create the timer with timer_create(id,fxn,params,eb) i use DMTimer3ModuleClkConfig();
Is it correct? It seems to be necessary
-
DMTimer2 calls the "clock_tick()" function:
Clock.tickSource = Clock.TickSource_USER;
and timer2Params.period = 1000; or timer2Params.period = 10;
In a Task i toggle a GPIO: Result is 100Hz with a .period of 1000 and 10kHz with a .period of 10.
(AND with timer2Params.period = 5; i reach 20kHz)(see question 2)
1) Is it right that the DMTimer2 as source for the clock_tick() function generates the clock for the Tasks?
__________________________________________________
DMTimer 3 calls a function ( also toggle a GPIO) every 50us:
timer3Params.period = 1200; // 24MHz/1200 counts = 20kH // CLK_M_OSC = 24MHz // (TLDR Register)
___________________________________
Both DMTimer are using the Timer Mode and
CLK_M_OSC: CLKSEL_TIMERx_CLK Register --> 0x1 = SEL2 : Select CLK_M_OSC clock
timer2Params.runMode = Timer_RunMode_CONTINUOUS; // Timer is periodic and runs continuously.
timer2Params.twer.ovf_wup_ena=1; // Enable overflow wake-up
2) With DMTimer3 i have a period of 50us (20kHz), why is the DMTimer 2 slower? How i can reach a higher frequency?
With .period i can reach a higher Hz, but why is there a factor of 240 (period 1200 to 5) between DMTimer 2 and 3.
3) How can i prioritize the DMTimer? Because the DMTimer 3 is the timer for a motor control calculation
Thank You