
16 Oct
2007
16 Oct
'07
10:06 p.m.
Hi,
The get_timer() function in DaVinci's timer.c doesn't handle overflow -- it simply subtracts the "base" from the current time, but if the timer overflowed and the current time is smaller than base, a negative number results. The attached patch fixes that.
The bug manifests itself e.g. when writing large blocks of flash (which take many minutes to complete), and it so happens that a write operation starts before the overflow and then times out prematurely because of it.
Please CC replies to me because I'm not on the list...
Regards, --Alex