Quick Timer Question


#1

Hi all!

Quick question regarding timers. I am subscribing to a cyclic timer set for a timer value of 8 minutes:

tmr_handler = adl_tmrSubscribe(TRUE, 4800, ADL_TMR_TYPE_100MS,evh_timer);

For some reason, the timer handler call-back function is getting triggered every ~104106 ms or every ~1041 100MS increments. What could be the reason for this, or have I possibly misread something?

I am debugging this in Open AT RTE mode using a Q2687H with OS 6.32 and firmware 7.43

Thanks,
Scott


#2

Is there any possibility that you have subscribed to timer more than once? Your code definitely should subscribe to 8 minute timer.


#3

Thanks for the reply blackyblack! That was my initial thought, but after tracing everything and putting a conditional statement before I subscribe to the timer, it seems pretty clear that I am subscribing just once. Even if I was subscribing to it more than once, the fact that the first time the callback function is triggered is only 1 minute and 44 seconds after it initially enter the function which subscribes to the timer, proves something is not working correctly. I am testing a modified version of the WIP udp_client sample, but the timer section has changed very little.

Thanks,
Scott


#4

Now try your app in release mode - just print something out of the timer handler. Also you could try install a bit older SDK. It seems that your OS is the newest one.


#5

It does work as expected in release mode, but that certainly doesn’t help me while I am trying to debug my app with multiple timers. Is this a bug or is there something I need to set up correctly in the remote task environment execution mode? Is there a different RTK I can use or try on the PC side?

Has anyone else experienced this?

Thanks,
Scott


#6

I do not use RTE mode so from this very point I cannot help you. Well you might debug your timers knowing that they all are 4 times faster than in release mode :slight_smile:


#7

Well, I certainly appreciate your help so far. I guess, I will have to go with debugging on the target for now.

Very true. Which is certainly not an issue when debugging other tasks of the application.

Does anyone know where we can post potential bugs? Like a bugzilla for Open AT? In this particular case, I imagine there is something wrong with the kernel in RTE mode maybe not being able to emulate the clock of the module on my OS (Shot in the dark).

Thanks,
Scott


#8

I also haven’t used RTE mode for ages because of functional “discrepancies” like this.

When I last did use it, I certainly do remember it messing me about because timers would (sometimes) be incorrect :angry:

(that was in the days when it was MSVS-based)


#9

Yeah, I am noticing more and more of those. So how do you debug a target app? I have been forced to “trace” everything to the UART.

Thanks,
Scott


#10

I have meet the same problem too ,is there anyone can work it out? TKS!