Posted: 05:17pm 13 Oct 2019 |
Copy link to clipboard |
Print this post |
|
I have just found a strange phenomenon. In my task called every 10 ms, I print the time between two calls when it exceeds 11ms. the code is the following
if ptime2> 11 then print "time between 2 tick of 10ms:"; str $ ((ptime2) / 1000,4,3) end if
it give that
Run time between 2 tick of 10ms: 0.013 error i1=0 nbcar:15 time between 2 tick of 10ms: 0.012 error i1=0 nbcar:25 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.014 time between 2 tick of 10ms: 0.012 error i1=0 nbcar:16 time between 2 tick of 10ms: 0.012 error i1=0 nbcar:82 >
In addition I also print a messgae if the iterruption on the UART is done while there are no characters "if loc (#n) = 0" in which case I get this
if in my timeout message (in the task called all s10ms), I add some spaces, I no longer get error "loc (#n) = 0" the code is as follows:
if ptime2> 11 then print " time between 2 tick of 10ms:"; str $ ((ptime2) / 1000,4,3) end if
it give that
Run time between 2 tick of 10ms: 323.989 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.012 time between 2 tick of 10ms: 0.012 >
Edited 2019-10-14 03:17 by goc30 |