AlarmTest

Introduction

With example program AlarmEval we had evaluated module Alarms for different timing and recovery test cases.

This example program AlarmTest simply re-runs a few of the same tests relevant to the simplified library module Alarms. The module API only changes regarding the initialisation of the alarm device RECORD (Alarms.Init).

Library Module Alarms

See AlarmEval, section Module Alarms, with the change that only option 2, ie. retiming, is implemented.

The Example Program

The program module AlarmTest is just a simplified variant of AlarmEval. The description in AlarmEval still applies, mutatis mutandis.

Refer to AlarmEval for the description of the test cases, the output, and the corresponding observations and conclusions. I’ll just show the results here. The test parameters are listed in the output.

Timing Baseline

No Pre-caching

StartTime:       FFFFFF9BH = FFFFFFFFH - 100
FirstRunAfter:   50
TimeBetweenRuns: 25
PreCachedProcs:  No
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFFA0H  FFFFFFA5H  FFFFFFB1H   12  FFFFFFB2H    6   18
   1  T  FFFFFFD2H  FFFFFFD2H    1  FFFFFFD3H  FFFFFFDEH  FFFFFFE4H    6  FFFFFFE6H   13   19
   2  T  FFFFFFEBH  FFFFFFEBH    0  FFFFFFEBH  FFFFFFEBH  FFFFFFECH    1  FFFFFFECH    0    1
   3  T  00000004H  00000004H    0  00000004H  00000004H  00000005H    1  00000005H    0    1
   4  T  0000001DH  0000001DH    0  0000001DH  0000001EH  00000022H    4  00000022H    1    5
   5  T  00000036H  00000036H    1  00000037H  00000042H  00000045H    3  00000046H   12   15
   6  T  0000004FH  0000004FH    0  0000004FH  0000004FH  00000050H    1  00000050H    0    1
   7  T  00000068H  00000068H    0  00000068H  00000068H  00000069H    1  00000069H    0    1
   8  T  00000081H  00000081H    0  00000081H                             00000081H    0    0

With Pre-caching

StartTime:       FFFFFF9BH = FFFFFFFFH - 100
FirstRunAfter:   50
TimeBetweenRuns: 25
PreCachedProcs:  Yes   (99)
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFF9EH  FFFFFF9FH  FFFFFF9FH    0  FFFFFFA0H    2    2
   1  T  FFFFFFD0H  FFFFFFD0H    0  FFFFFFD0H  FFFFFFD0H  FFFFFFD1H    1  FFFFFFD1H    0    1
   2  T  FFFFFFE9H  FFFFFFE9H    0  FFFFFFE9H  FFFFFFE9H  FFFFFFEAH    1  FFFFFFEAH    0    1
   3  T  00000002H  00000002H    0  00000002H  00000002H  00000003H    1  00000003H    0    1
   4  T  0000001BH  0000001BH    0  0000001BH  0000001BH  0000001CH    1  0000001CH    0    1
   5  T  00000034H  00000034H    0  00000034H  00000034H  00000035H    1  00000035H    0    1
   6  T  0000004DH  0000004DH    0  0000004DH  0000004DH  0000004EH    1  0000004EH    0    1
   7  T  00000066H  00000066H    0  00000066H  00000066H  00000067H    1  00000067H    0    1
   8  T  0000007FH  0000007FH    0  0000007FH                             0000007FH    0    0

Decreasing Consecutive Alarm Times: AlarmEval.TimeBetweenRuns = 15

StartTime:       FFFFFF9BH = FFFFFFFFH - 100
FirstRunAfter:   50
TimeBetweenRuns: 15
PreCachedProcs:  No
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFFA0H  FFFFFFA5H  FFFFFFB1H   12  FFFFFFB2H    6   18
   1  T  FFFFFFD2H  FFFFFFD2H    1  FFFFFFD3H  FFFFFFDEH  FFFFFFE5H    7  FFFFFFE6H   12   19
   2  R  FFFFFFE1H  FFFFFFE9H    8  FFFFFFE9H  FFFFFFE9H  FFFFFFEAH    1  FFFFFFEAH    0    1
   3  R  FFFFFFF0H  FFFFFFF1H    1  FFFFFFF1H  FFFFFFF1H  FFFFFFF2H    1  FFFFFFF2H    0    1
   4  T  FFFFFFFFH  FFFFFFFFH    0  FFFFFFFFH  00000000H  00000004H    4  00000004H    1    5
   5  T  0000000EH  0000000EH    1  0000000FH  0000001AH  0000001DH    3  0000001EH   12   15
   6  R  0000001DH  00000023H    6  00000023H  00000023H  00000024H    1  00000024H    0    1
   7  T  0000002CH  0000002CH    0  0000002CH  0000002CH  0000002DH    1  0000002DH    0    1
   8  T  0000003BH  0000003BH    0  0000003BH                             0000003BH    0    0

Further Decreasing Consecutive Alarm Times: AlarmEval.TimeBetweenRuns = 5

No Pre-caching

StartTime:       FFFFFFB9H = FFFFFFFFH - 70
FirstRunAfter:   50
TimeBetweenRuns: 5
PreCachedProcs:  No
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFFBEH  FFFFFFC3H  FFFFFFCFH   12  FFFFFFD0H    6   18
   1  T  FFFFFFF0H  FFFFFFF0H    1  FFFFFFF1H  FFFFFFFCH  00000003H    7  00000004H   12   19
   2  R  FFFFFFF5H  00000007H   18  00000007H  00000007H  00000008H    1  00000008H    0    1
   3  R  FFFFFFFAH  0000000FH   21  0000000FH  0000000FH  00000010H    1  00000010H    0    1
   4  R  FFFFFFFFH  00000017H   24  00000017H  00000018H  0000001CH    4  0000001CH    1    5
   5  R  00000004H  00000022H   31  00000023H  0000002EH  00000031H    3  00000032H   12   15
   6  R  00000009H  00000037H   46  00000037H  00000037H  00000038H    1  00000038H    0    1
   7  R  0000000EH  0000003FH   49  0000003FH  0000003FH  00000040H    1  00000040H    0    1
   8  R  00000013H  00000047H   52  00000047H                             00000047H    0    0

With Pre-caching

StartTime:       FFFFFFB9H = FFFFFFFFH - 70
FirstRunAfter:   50
TimeBetweenRuns: 5
PreCachedProcs:  Yes   (99)
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFFBCH  FFFFFFBCH  FFFFFFBDH    1  FFFFFFBDH    0    1
   1  T  FFFFFFEEH  FFFFFFEEH    0  FFFFFFEEH  FFFFFFEEH  FFFFFFEFH    1  FFFFFFEFH    0    1
   2  T  FFFFFFF3H  FFFFFFF3H    0  FFFFFFF3H  FFFFFFF3H  FFFFFFF4H    1  FFFFFFF4H    0    1
   3  T  FFFFFFF8H  FFFFFFF8H    0  FFFFFFF8H  FFFFFFF8H  FFFFFFF9H    1  FFFFFFF9H    0    1
   4  T  FFFFFFFDH  FFFFFFFDH    0  FFFFFFFDH  FFFFFFFDH  FFFFFFFEH    1  FFFFFFFEH    0    1
   5  T  00000002H  00000002H    0  00000002H  00000002H  00000003H    1  00000003H    0    1
   6  T  00000007H  00000007H    0  00000007H  00000007H  00000008H    1  00000008H    0    1
   7  T  0000000CH  0000000CH    0  0000000CH  0000000CH  0000000DH    1  0000000DH    0    1
   8  T  00000011H  00000011H    0  00000011H                             00000011H    0    0

Decreasing Alarm Set-up Time: AlarmEval.FirstRunAfter = 5

No Pre-caching

StartTime:       FFFFFF9BH = FFFFFFFFH - 100
FirstRunAfter:   5
TimeBetweenRuns: 25
PreCachedProcs:  No
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFFA0H  FFFFFFA5H  FFFFFFC7H   34  FFFFFFC8H    6   40
   1  R  FFFFFFA5H  FFFFFFB2H   14  FFFFFFB3H  FFFFFFBEH  FFFFFFC4H    6  FFFFFFC6H   13   19
   2  R  FFFFFFBEH  FFFFFFC9H   11  FFFFFFC9H  FFFFFFCAH  FFFFFFCBH    1  FFFFFFCBH    1    2
   3  T  FFFFFFD7H  FFFFFFD7H    0  FFFFFFD7H  FFFFFFD7H  FFFFFFD8H    1  FFFFFFD8H    0    1
   4  T  FFFFFFF0H  FFFFFFF0H    0  FFFFFFF0H  FFFFFFF1H  FFFFFFF5H    4  FFFFFFF5H    1    5
   5  T  00000009H  00000009H    1  0000000AH  00000015H  00000018H    3  00000019H   12   15
   6  T  00000022H  00000022H    0  00000022H  00000022H  00000023H    1  00000023H    0    1
   7  T  0000003BH  0000003BH    0  0000003BH  0000003BH  0000003CH    1  0000003CH    0    1
   8  T  00000054H  00000054H    0  00000054H                             00000054H    0    0

With Pre-caching

StartTime:       FFFFFF9BH = FFFFFFFFH - 100
FirstRunAfter:   5
TimeBetweenRuns: 25
PreCachedProcs:  Yes   (99)
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFF9EH  FFFFFF9EH  FFFFFF9FH    1  FFFFFF9FH    0    1
   1  T  FFFFFFA3H  FFFFFFA3H    0  FFFFFFA3H  FFFFFFA4H  FFFFFFA5H    1  FFFFFFA5H    1    2
   2  T  FFFFFFBCH  FFFFFFBCH    0  FFFFFFBCH  FFFFFFBCH  FFFFFFBDH    1  FFFFFFBDH    0    1
   3  T  FFFFFFD5H  FFFFFFD5H    0  FFFFFFD5H  FFFFFFD5H  FFFFFFD6H    1  FFFFFFD6H    0    1
   4  T  FFFFFFEEH  FFFFFFEEH    0  FFFFFFEEH  FFFFFFEEH  FFFFFFF0H    2  FFFFFFF0H    0    2
   5  T  00000007H  00000007H    0  00000007H  00000007H  00000008H    1  00000008H    0    1
   6  T  00000020H  00000020H    0  00000020H  00000020H  00000021H    1  00000021H    0    1
   7  T  00000039H  00000039H    0  00000039H  00000039H  0000003AH    1  0000003AH    0    1
   8  T  00000052H  00000052H    0  00000052H                             00000052H    0    0

Faulty “Impossible” Values

StartTime:       FFFFFF9BH = FFFFFFFFH - 100
FirstRunAfter:   -5
TimeBetweenRuns: -5
PreCachedProcs:  No
 run rm     al-arm     al-run rdel    run-beg        arm      armed  atm    run-end  htm  rtm
   0                                FFFFFFA0H  FFFFFFA6H  FFFFFFC9H   35  FFFFFFCAH    7   42
   1  R  FFFFFF9BH  FFFFFFB3H   26  FFFFFFB5H  FFFFFFBFH  FFFFFFC6H    7  FFFFFFC7H   11   18
   2  R  FFFFFF96H  FFFFFFCBH   53  FFFFFFCBH  FFFFFFCBH  FFFFFFCCH    1  FFFFFFCCH    0    1
   3  R  FFFFFF91H  FFFFFFD3H   66  FFFFFFD3H  FFFFFFD4H  FFFFFFD5H    1  FFFFFFD5H    1    2
   4  R  FFFFFF8CH  FFFFFFDBH   79  FFFFFFDBH  FFFFFFDCH  FFFFFFE0H    4  FFFFFFE0H    1    5
   5  R  FFFFFF87H  FFFFFFE6H   96  FFFFFFE7H  FFFFFFF2H  FFFFFFF6H    4  FFFFFFF7H   12   16
   6  R  FFFFFF82H  FFFFFFFCH  122  FFFFFFFCH  FFFFFFFCH  FFFFFFFDH    1  FFFFFFFDH    0    1
   7  R  FFFFFF7DH  00000004H  135  00000004H  00000004H  00000005H    1  00000005H    0    1
   8  R  FFFFFF78H  0000000CH  148  0000000CH                             0000000CH    0    0

Bottom Line

The simplified library module Alarms appears to work properly.

Output Terminal

See Set-up, one-terminal set-up.

Build and Run

Build module AlarmTest with Astrobe, and create and upload the UF2 file using abin2uf2.

Set Astrobe’s memory options as listed, and the library search path as explained.

Repository