Hello,
I think I've found a bug in common_tmr.c (see possible patch below).
There might be a timer IRQ between setting tempcnt (whose value is then
close to cmn_systimer_us_per_interrupt) and tempsys. This results in a
crtsys value jump because tempcnt is added to the *updated*
cmn_systimer_counter.
Switching the two lines should circumvent this problem. A tempcnt
wrap-around (and thus an IRQ) might nevertheless occur between setting
tempsys and tempcnt but we handle this case anyway.
diff --git a/src/common_tmr.c b/src/common_tmr.c
--- a/src/common_tmr.c
+++ b/src/common_tmr.c
@@ -417,8 +417,8 @@
{
u64 tempsys, tempcnt, crtsys;
+ tempsys = cmn_systimer_counter;
tempcnt = platform_timer_sys_raw_read();
- tempsys = cmn_systimer_counter;
while( ( crtsys = cmn_systimer_counter ) != tempsys )
{
tempcnt = platform_timer_sys_raw_read();
Regards,
Markus Korber
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev