📄 readme-timestamp
字号:
README - timestampT.c
This timestamp demo has three functions:
timestampTest() - main routine to be called for the timestamp test
timestampInterval() - routine used as a task to display timestamp data at certain
intervals
timestampRollover() - routine called when an interrupt occurs during the timestamp
roll-over
timestampTest():
This is the main routine that you will call to run the test. This routine
installs the timestamp ISR, spawns a task and uses a semaphore to capture
that task. The task that was spawned calls the timestampInterval routine
and when the timestamp device rolls-over, the interrupt calls the
timestampRollover routine. The time it takes the timestamp device to roll
over is estimated to be about 85 seconds.
In order to run the test, execute timestampTest in your shell and
follow the prompts (an example of a typical output can be found below).
timestampInterval():
This routine's purpose is to check the time interval between two given
timestamps and ensure that this time is accurate according to the time
interval given by the user. It also adjusts for when a rollover occurs
so that there are no discrepencies with the time intervals.
timestampRollover():
This routine is invoked upon a roll-over of the timestamp device. It raises
a flag for the timestampInterval routine, telling it that the timestamp
device has rolled over. This routine also calculates the time it has taken
since the beginning of timestampTest to roll-over.
The following is an example of the typical output for the timestampTest:
-> timestampTest
Enter desired Time Interval(between 1 and 40 seconds): 10
Enter desired number of Iterations: 9
********************************************************
* Timestamp Test Started *
********************************************************
The test will run 9 times at 10 second intervals...
Initial timestamp: 3108 ticks
System timestamp period: 4294967295 ticks
System timestamp frequency: 50000000 Hz
________________________________________________________
Delta between ticks: 9.999985 seconds
Accuracy of delta: 99.998474 %
Delta between ticks: 9.999984 seconds
Accuracy of delta: 99.998383 %
Delta between ticks: 9.999986 seconds
Accuracy of delta: 99.998566 %
Delta between ticks: 9.999986 seconds
Accuracy of delta: 99.998566 %
Delta between ticks: 9.999986 seconds
Accuracy of delta: 99.998566 %
Delta between ticks: 9.999986 seconds
Accuracy of delta: 99.998566 %
Delta between ticks: 9.999985 seconds
Accuracy of delta: 99.998474 %
Delta between ticks: 9.999986 seconds
Accuracy of delta: 99.998566 %
________________________________________________________
A roll-over has occurred at 85 seconds.
________________________________________________________
Delta between ticks: 9.999986 seconds
Accuracy of delta: 99.999855 %
________________________________________________________
Time to run the test: 90 seconds
Number of rollovers: 1
Timestamp rollover 1: 4294967295 ticks
Final timestamp: 216980876 ticks
********************************************************
* Timestamp Test Completed *
********************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -