millis() significantly broken! #143

Closed
WestfW opened this Issue Nov 1, 2011 · 3 comments

Projects

None yet

3 participants

@WestfW
WestfW commented Nov 1, 2011

The patch for #124 seems to have broken millis() pretty significantly.
Printing millis() and micros() in response to a periodic signal (chasing another issue; discussion here: http://chipkit.org/forum/viewtopic.php?f=6&t=464 ) produces this massive glitch in millis() near the 107 s mark, when the core timer overflows:

103.07 - 103 - 1001119
104.07 - 104 - 1001119
105.07 - 105 - 1001119
106.07 - 106 - 1001119
107.07 - 107 - 1001120
214.75 - 107 - 698505
214.75 - 108 - 1001118
214.75 - 109 - 1001119
214.75 - 110 - 1001120
214.75 - 111 - 1001120
214.75 - 112 - 1001121

millis() continues to report 214750 until about the (actual) 214 second mark, at which point it starts behaving normally again:

214.75 - 210 - 1001119
214.75 - 211 - 1001116
214.75 - 212 - 1001121
214.75 - 213 - 1001118
215.30 - 214 - 444251
216.29 - 215 - 1001120
217.26 - 216 - 1001116
218.23 - 217 - 1001121
219.21 - 218 - 1001116
220.21 - 219 - 1001121
221.20 - 220 - 1001118

And then it breaks again at ~321 s:

318.31 - 317 - 1001118
319.31 - 318 - 1001120
320.31 - 319 - 1001119
321.31 - 320 - 1001117
429.50 - 320 - 189963
429.50 - 321 - 1001120
429.50 - 322 - 1001119
429.50 - 323 - 1001117

@ricklon
Member
ricklon commented Nov 1, 2011

Thanks for the report. Brian is working on it. I'm ready to add it to
he build as soon as the fix is ready.

-_Rick

On Tue, Nov 1, 2011 at 2:44 AM, WestfW
reply@reply.github.com
wrote:

The patch for #124 seems to have broken millis() pretty significantly.
Printing millis() and micros() in response to a periodic signal (chasing another issue; discussion here: http://chipkit.org/forum/viewtopic.php?f=6&t=464 ) produces this massive glitch in millis() near the 107 s mark, when the core timer overflows:

103.07 - 103 - 1001119
104.07 - 104 - 1001119
105.07 - 105 - 1001119
106.07 - 106 - 1001119
107.07 - 107 - 1001120
214.75 - 107 - 698505
214.75 - 108 - 1001118
214.75 - 109 - 1001119
214.75 - 110 - 1001120
214.75 - 111 - 1001120
214.75 - 112 - 1001121

millis() continues to report 214750 until about the (actual) 214 second mark, at which point it starts behaving normally again:

214.75 - 210 - 1001119
214.75 - 211 - 1001116
214.75 - 212 - 1001121
214.75 - 213 - 1001118
215.30 - 214 - 444251
216.29 - 215 - 1001120
217.26 - 216 - 1001116
218.23 - 217 - 1001121
219.21 - 218 - 1001116
220.21 - 219 - 1001121
221.20 - 220 - 1001118

And then it breaks again at ~321 s:

318.31 - 317 - 1001118
319.31 - 318 - 1001120
320.31 - 319 - 1001119
321.31 - 320 - 1001117
429.50 - 320 - 189963
429.50 - 321 - 1001120
429.50 - 322 - 1001119
429.50 - 323 - 1001117

Reply to this email directly or view it on GitHub:
#143

President
Fair Use Building and Research (FUBAR) Labs
http://fubarlabs.org

@ricklon
Member
ricklon commented Nov 1, 2011

Detailed discussion of the issue here:
http://www.chipkit.org/forum/viewtopic.php?f=6&t=464

@msproul
Contributor
msproul commented Nov 25, 2011

My tests confirm this is fixed

Mark

@msproul msproul closed this Nov 25, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment