Other Parts Discussed in Thread: SYSBIOS
Hi,
Am using AWR1843, Am trying to configure some periodic events so am using the Timer and Clock modules from the BIOS, but when I use the code referred in the BIOS user guide, I get the following two issues: 1- regarding the Timer: I can't configure more than one time, when I do, only the first one works, the second one is not coming. 2- Regarding the Clock: when I configure more than one clock event, not all of them come with the correct period, some of them have duplicated periods, and the others are fine. So are there any constraints on using that code referred in the BIOS user guide regarding using it more than once to configure multiple events at the same time? I used the exact mentioned in the BIOS user guide.
The code for using one Timer instant:
Timer_Params timerParams;
Timer_Handle myTimer;
Error_Block eb;
Error_init(&eb);
Timer_Params_init(&timerParams);
timerParams.period = 10;
timerParams.periodType = Timer_PeriodType_MICROSECS;
timerParams.arg = 1;
myTimer = Timer_create(Timer_ANY, myIsr, &timerParams, &eb);
if (myTimer == NULL) {
System_abort("Timer create failed");
}
The code for using one Clock instant:
Clock_Params clockParams;
Clock_Handle myClock;
Error_Block eb;
Error_init(&eb);
Clock_Params_init(&clockParams);
clockParams.period = 5;
clockParams.startFlag = TRUE;
clockParams.arg = (UArg)0x5555;
myClock = Clock_create(myHandler1, 5, &clockParams, &eb);
if (myClock == NULL) {
System_abort("Clock create failed");
}
What I understood for the Timer; is that there are 2 RTI timer modules, RTIA and RTIB, and each one does have 4 interrupts, so I can use this code 8 times to configure 8 different timing events, but this is not working as I mentioned, only 1 can be done, and the other are not working.
And for the Clock, it is something that's timing is handled by the BIOS; which tick is 1 ms by default, so whatever events can be configured as long as they are with period more than or equal the 1 ms, but this is not the case also, when I configure them, I have to place them in order from the high period to the low period, otherwise the other events will not be working, and even if I do, not all of them are coming with the correct period, some of them come with double the configured period.