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

benpicco notifications at github.com
Fri Apr 5 18:18:09 CEST 2019


I found the issue! I didn't check if `INTENSET` was actually set, only if `INTFLAG` was set, so the interrupt callback got called even when then interrupt was not enabled, but another one triggered.

Now it looks like before:
```
2019-04-05 18:17:31,534 - INFO # ------------- BEGIN STATISTICS --------------
2019-04-05 18:17:31,537 - INFO # ===== Reference timer statistics =====
2019-04-05 18:17:31,542 - INFO # Limits: mean: [-10, 10], variance: [0, 16]
2019-04-05 18:17:31,553 - INFO # Target error (actual trigger time - expected trigger time), in reference timer ticks
2019-04-05 18:17:31,563 - INFO # positive: timer under test is late, negative: timer under test is early
2019-04-05 18:17:31,565 - INFO # === timer_set running ===
2019-04-05 18:17:31,569 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:31,580 - INFO #   16 -   17:    50966    784464        19994     14    16    15      0  <=== SIC!
2019-04-05 18:17:31,585 - INFO #   18 -   19:    51242    793777        25146     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,597 - INFO #   20 -   23:    51255    785653        16828     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,609 - INFO #   24 -   31:    51623    800483        26135     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,616 - INFO #   32 -   47:    51502    805521        32989     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,632 - INFO #   48 -   79:    51222    820462         1390     15    17    16      0  <=== SIC!
2019-04-05 18:17:31,649 - INFO #   80 -  143:    39063    632731         7723     16    17    16      0  <=== SIC!
2019-04-05 18:17:31,665 - INFO #       TOTAL    346873   5423091      1583398     14    17    15      4  <=== SIC!
2019-04-05 18:17:31,672 - INFO # === timer_set resched ===
2019-04-05 18:17:31,688 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:31,699 - INFO #   16 -   17:    51130    786622        19680     14    16    15      0  <=== SIC!
2019-04-05 18:17:31,704 - INFO #   18 -   19:    51303    794345        24800     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,717 - INFO #   20 -   23:    51542    790855        17725     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,732 - INFO #   24 -   31:    50968    790173        25649     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,741 - INFO #   32 -   47:    50769    792887        31351     15    16    15      0  <=== SIC!
2019-04-05 18:17:31,750 - INFO #   48 -   79:    50719    811914         1104     15    17    16      0  <=== SIC!
2019-04-05 18:17:31,762 - INFO #   80 -  143:    39174    632221         5437     16    17    16      0  <=== SIC!
2019-04-05 18:17:31,770 - INFO #       TOTAL    345605   5399017      1569881     14    17    15      4  <=== SIC!
2019-04-05 18:17:31,777 - INFO # === timer_set stopped ===
2019-04-05 18:17:31,787 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:31,813 - INFO #   16 -   17:    50694     50735           41      1     2     1      0
2019-04-05 18:17:31,825 - INFO #   18 -   19:    50919     67130        16210      1     2     1      0
2019-04-05 18:17:31,834 - INFO #   20 -   23:    51407     92272        40862      1     2     1      0
2019-04-05 18:17:31,845 - INFO #   24 -   31:    51272     72484        21211      1     2     1      0
2019-04-05 18:17:31,855 - INFO #   32 -   47:    51174     93631        42447      1     2     1      0
2019-04-05 18:17:31,867 - INFO #   48 -   79:    50857    103828         2118      1     3     2      0
2019-04-05 18:17:31,887 - INFO #   80 -  143:    38939     85710         7832      2     3     2      0
2019-04-05 18:17:31,896 - INFO #       TOTAL    345262    565790       320259      1     3     1      0
2019-04-05 18:17:31,902 - INFO # === timer_set stopped, resched ===
2019-04-05 18:17:31,911 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:31,920 - INFO #   16 -   17:    51130     51153           23      1     2     1      0
2019-04-05 18:17:31,933 - INFO #   18 -   19:    51265     65717        14452      1     2     1      0
2019-04-05 18:17:31,945 - INFO #   20 -   23:    50806     92003        41194      1     2     1      0
2019-04-05 18:17:31,958 - INFO #   24 -   31:    50427     70475        20042      1     2     1      0
2019-04-05 18:17:31,968 - INFO #   32 -   47:    51157     93328        42171      1     2     1      0
2019-04-05 18:17:31,983 - INFO #   48 -   79:    51144    103757         1477      1     3     2      0
2019-04-05 18:17:31,992 - INFO #   80 -  143:    39192     84116         5732      2     3     2      0
2019-04-05 18:17:31,996 - INFO #       TOTAL    345121    560549       312964      1     3     1      0
2019-04-05 18:17:32,009 - INFO # === timer_set_absolute running ===
2019-04-05 18:17:32,025 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:32,034 - INFO #   16 -   17:    51063    434732        26227      8     9     8      0
2019-04-05 18:17:32,045 - INFO #   18 -   19:    51390    435526        24406      8     9     8      0
2019-04-05 18:17:32,061 - INFO #   20 -   23:    51022    423384        15208      8     9     8      0
2019-04-05 18:17:32,074 - INFO #   24 -   31:    51058    434696        26232      8     9     8      0
2019-04-05 18:17:32,085 - INFO #   32 -   47:    50652    438253        33036      8     9     8      0
2019-04-05 18:17:32,096 - INFO #   48 -   79:    50765    457818         1359      8    10     9      0
2019-04-05 18:17:32,106 - INFO #   80 -  143:    39237    361124         7991      9    10     9      0
2019-04-05 18:17:32,114 - INFO #       TOTAL    345187   2985533       953401      8    10     8      2
2019-04-05 18:17:32,117 - INFO # === timer_set_absolute resched ===
2019-04-05 18:17:32,131 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:32,142 - INFO #   16 -   17:    51294    436289        25937      8     9     8      0
2019-04-05 18:17:32,148 - INFO #   18 -   19:    51274    434943        24751      8     9     8      0
2019-04-05 18:17:32,152 - INFO #   20 -   23:    51423    427006        15618      8     9     8      0
2019-04-05 18:17:32,154 - INFO #   24 -   31:    51349    436905        26111      8     9     8      0
2019-04-05 18:17:32,156 - INFO #   32 -   47:    50976    439774        31965      8     9     8      0
2019-04-05 18:17:32,158 - INFO #   48 -   79:    51123    460746         1203      8    10     9      0
2019-04-05 18:17:32,159 - INFO #   80 -  143:    38964    356992         6316      9    10     9      0
2019-04-05 18:17:32,160 - INFO #       TOTAL    346403   2992655       949639      8    10     8      2
2019-04-05 18:17:32,161 - INFO # === timer_set_absolute stopped ===
2019-04-05 18:17:32,162 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:32,164 - INFO #   16 -   17:    51157     51199           42      1     2     1      0
2019-04-05 18:17:32,166 - INFO #   18 -   19:    51252     67911        16658      1     2     1      0
2019-04-05 18:17:32,167 - INFO #   20 -   23:    51250     91670        40420      1     2     1      0
2019-04-05 18:17:32,169 - INFO #   24 -   31:    51216     72541        21325      1     2     1      0
2019-04-05 18:17:32,170 - INFO #   32 -   47:    50672     92978        42302      1     2     1      0
2019-04-05 18:17:32,172 - INFO #   48 -   79:    51215    104543         2119      1     3     2      0
2019-04-05 18:17:32,174 - INFO #   80 -  143:    38992     86147         8163      2     3     2      0
2019-04-05 18:17:32,176 - INFO #       TOTAL    345754    566989       321719      1     3     1      0
2019-04-05 18:17:32,177 - INFO # === timer_set_absolute stopped, resched ===
2019-04-05 18:17:32,178 - INFO #    interval     count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:32,180 - INFO #   16 -   17:    51159     51192           33      1     2     1      0
2019-04-05 18:17:32,182 - INFO #   18 -   19:    50690     65001        14311      1     2     1      0
2019-04-05 18:17:32,185 - INFO #   20 -   23:    51086     92495        41398      1     2     1      0
2019-04-05 18:17:32,186 - INFO #   24 -   31:    51276     71659        20383      1     2     1      0
2019-04-05 18:17:32,188 - INFO #   32 -   47:    50854     92703        41849      1     2     1      0
2019-04-05 18:17:32,191 - INFO #   48 -   79:    50632    102705         1445      1     3     2      0
2019-04-05 18:17:32,193 - INFO #   80 -  143:    38966     83717         5785      2     3     2      0
2019-04-05 18:17:32,194 - INFO #       TOTAL    344663    559472       311626      1     3     1      0
2019-04-05 18:17:32,195 - INFO # ===== introspective statistics =====
2019-04-05 18:17:32,196 - INFO # Limits: mean: [-10, 10], variance: [0, 16]
2019-04-05 18:17:32,198 - INFO # self-referencing error (TUT time elapsed - expected TUT interval), in timer under test ticks
2019-04-05 18:17:32,200 - INFO # positive: timer target handling is slow, negative: TUT is dropping ticks or triggering callback early
2019-04-05 18:17:32,202 - INFO # function              count       sum       sum_sq    min   max  mean  variance
2019-04-05 18:17:32,202 - INFO # 
2019-04-05 18:17:32,207 - INFO #          timer_set  1382861  -1623793     15035695     -5     3    -1     10
2019-04-05 18:17:32,208 - INFO #            running   346873    795356       101630      1     3     2      0
2019-04-05 18:17:32,210 - INFO #            resched   345605    790518        99315      1     3     2      0
2019-04-05 18:17:32,213 - INFO #            stopped   345262  -1605009       223956     -5    -4    -4      0
2019-04-05 18:17:32,214 - INFO #   stopped, resched   345121  -1604658       224171     -5    -4    -4      0
2019-04-05 18:17:32,215 - INFO # 
2019-04-05 18:17:32,217 - INFO # timer_set_absolute  1382007  -6466324       938289     -5    -4    -4      0
2019-04-05 18:17:32,219 - INFO #            running   345187  -1624035       243283     -5    -4    -4      0
2019-04-05 18:17:32,221 - INFO #            resched   346403  -1631766       246153     -5    -4    -4      0
2019-04-05 18:17:32,223 - INFO #            stopped   345754  -1606924       223906     -5    -4    -4      0
2019-04-05 18:17:32,225 - INFO #   stopped, resched   344663  -1603599       224947     -5    -4    -4      0
2019-04-05 18:17:32,225 - INFO # -------------- 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-480335712
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190405/8970d943/attachment-0001.html>


More information about the notifications mailing list