[riot-notifications] [RIOT-OS/RIOT] sam0_common: make Timer implementation common across all sam0 MCUs (#11336)

Federico Pellegrin notifications at github.com
Sat Apr 6 06:13:20 CEST 2019


Very good, thanks for the changes!
I can confirm now that on my saml21-xpro the results of the benchmark are in line with the ones on the master:

```
main(): This is RIOT! (Version: 2014.01-19976-g6f0c7d-sam0-timer)

Statistical benchmark for timers
Running timer test with seed 123 using Tiny Mersenne Twister PRNG.
TEST_MIN = 16
TEST_MAX = 128
TEST_MIN_REL = 16
TEST_MAX_REL = 128
TEST_NUM = 113
log2(TEST_NUM - 1) = 6
state vector elements per variant = 7
number of variants = 8
sizeof(state) = 32 bytes
state vector total memory usage = 1792 bytes
TIM_TEST_DEV = 0, TIM_TEST_FREQ = 1000000, TIM_TEST_CHAN = 0
TIM_REF_DEV  = 0, TIM_REF_FREQ  = 1000000
USE_REFERENCE = 1
TEST_PRINT_INTERVAL_TICKS = 30000000
Expected error variance due to truncation in tick conversion: 0
Calibrating spin delay...
spin_max = 38
Estimating benchmark overhead...
overhead_target = 17 (s2 = 0)
overhead_read = 17 (s2 = 0)
exp_mask = 00000007
max interval = 255
Elapsed time:
        Reference: 4294
 Timer under test: 4294
 Wall clock (RTT): 0
------------- BEGIN STATISTICS --------------
===== Reference timer statistics =====
Limits: mean: [-10, 10], variance: [0, 16]
Target error (actual trigger time - expected trigger time), in reference timer ticks
positive: timer under test is late, negative: timer under test is early
=== timer_set running ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5287     27061         2657      4     6     5      0
  18 -   19:     5430     16959         2685      2     4     3      0
  20 -   23:     5285      6460         2965      0     5     1      0
  24 -   31:     5338     15969         4848      0     5     2      0
  32 -   47:     5222     15355         4906      2     3     2      0
  48 -   79:     5364     15756         5014      2     3     2      0
  80 -  143:     4046     11910         3786      2     3     2      0
      TOTAL     35972    109470         9073      0     6     3      0
=== timer_set resched ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5194     26593         2516      4     6     5      0
  18 -   19:     5366     16775         2632      2     4     3      0
  20 -   23:     5353      6613         3280      0     5     1      0
  24 -   31:     5401     16151         7276      0     5     2      1
  32 -   47:     5318     15600         4964      2     3     2      0
  48 -   79:     5288     15542         4944      2     3     2      0
  80 -  143:     4085     12009         3809      2     3     2      0
      TOTAL     36005    109283        10079      0     6     3      0
=== timer_set stopped ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5396    -42636         6435     -8    -4    -7      1
  18 -   19:     5303    -40387         7577     -8    -4    -7      1
  20 -   23:     5332    -30829         4201     -7    -5    -5      0
  24 -   31:     5330    -31980            0     -6    -6    -6      0
  32 -   47:     5389    -32334            0     -6    -6    -6      0
  48 -   79:     5281    -31686            0     -6    -6    -6      0
  80 -  143:     4136    -24816            0     -6    -6    -6      0
      TOTAL     36167   -234668       113852     -8    -4    -6      3
=== timer_set stopped, resched ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5363    -42372         6370     -8    -4    -7      1
  18 -   19:     5333    -40729         7526     -8    -4    -7      1
  20 -   23:     5276    -30569         4210     -7    -5    -5      0
  24 -   31:     5414    -32484            0     -6    -6    -6      0
  32 -   47:     5359    -32154            0     -6    -6    -6      0
  48 -   79:     5229    -31374            0     -6    -6    -6      0
  80 -  143:     4019    -24114            0     -6    -6    -6      0
      TOTAL     35993   -233796       113670     -8    -4    -6      3
=== timer_set_absolute running ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5418      -267         2618     -1     1     0      0
  18 -   19:     5378    -11122         2755     -3    -1    -2      0
  20 -   23:     5360    -20350         6399     -5     0    -3      1
  24 -   31:     5408    -10625         7470     -5     0    -1      1
  32 -   47:     5368    -11082          346     -3    -2    -2      0
  48 -   79:     5376    -11097          345     -3    -2    -2      0
  80 -  143:     4062     -8378          254     -3    -2    -2      0
      TOTAL     36370    -72921        29378     -5     1    -2      0
=== timer_set_absolute resched ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5427      -330         2712     -1     1     0      0
  18 -   19:     5436    -11212         2712     -3    -1    -2      0
  20 -   23:     5285    -20137         6258     -5     0    -3      1
  24 -   31:     5319    -10410         8007     -5     0    -1      1
  32 -   47:     5441    -11216          334     -3    -2    -2      0
  48 -   79:     5310    -10944          324     -3    -2    -2      0
  80 -  143:     4038     -8322          246     -3    -2    -2      0
      TOTAL     36256    -72571        29660     -5     1    -2      0
=== timer_set_absolute stopped ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5176    -40932         6113     -8    -4    -7      1
  18 -   19:     5266    -40446         7061     -8    -4    -7      1
  20 -   23:     5297    -30585         4129     -7    -5    -5      0
  24 -   31:     5286    -31716            0     -6    -6    -6      0
  32 -   47:     5272    -31632            0     -6    -6    -6      0
  48 -   79:     5323    -31938            0     -6    -6    -6      0
  80 -  143:     4125    -24750            0     -6    -6    -6      0
      TOTAL     35745   -231999       111963     -8    -4    -6      3
=== timer_set_absolute stopped, resched ===
   interval     count       sum       sum_sq    min   max  mean  variance
  16 -   17:     5287    -41820         6187     -8    -4    -7      1
  18 -   19:     5395    -41289         7425     -8    -4    -7      1
  20 -   23:     5378    -31187         4312     -7    -5    -5      0
  24 -   31:     5343    -32058            0     -6    -6    -6      0
  32 -   47:     5411    -32466            0     -6    -6    -6      0
  48 -   79:     5372    -32232            0     -6    -6    -6      0
  80 -  143:     4086    -24516            0     -6    -6    -6      0
      TOTAL     36272   -235568       114296     -8    -4    -6      3
===== introspective statistics =====
Limits: mean: [-10, 10], variance: [0, 16]
self-referencing error (TUT time elapsed - expected TUT interval), in timer under test ticks
positive: timer target handling is slow, negative: TUT is dropping ticks or triggering callback early
function              count       sum       sum_sq    min   max  mean  variance

         timer_set   144137  -1018897       799298    -12    -2    -7      5
           running    35972   -153762        59672     -7    -2    -4      1
           resched    36005   -154090        59503     -7    -2    -4      1
           stopped    36167   -356225        90602    -12    -8    -9      2
  stopped, resched    35993   -354820        90987    -12    -8    -9      2

timer_set_absolute   144643  -1385883       300262    -12    -7    -9      2
           running    36370   -338875        60473    -12    -7    -9      1
           resched    36256   -337631        59475    -12    -7    -9      1
           stopped    35745   -352062        89352    -12    -8    -9      2
  stopped, resched    36272   -357315        90962    -12    -8    -9      2
-------------- END STATISTICS ---------------
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11336#issuecomment-480472522
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190405/f8e28393/attachment-0001.html>


More information about the notifications mailing list