zephyr/tests
Florian Grandel a4cd5cee40 drivers: ieee802154: consistent high res timestamps
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps

All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.

The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.

For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).

Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g.  UTC, TAI, PTP, NTP, ...).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-28 09:06:35 +00:00
..
application_development tests: code_relocation: support mr_canhubk3 boards 2023-07-14 09:38:43 +02:00
arch dts: Move to 'zephyr,memory-attr' 2023-07-25 11:22:10 +02:00
benchmarks test: Enhance benchmark latency reporting 2023-07-19 17:51:36 -04:00
bluetooth bluetooth: tester: gap: Add support for extended advertising 2023-07-26 14:33:22 +02:00
boards tests: boards: espressif: add esp32s3 to cache coex test 2023-07-26 14:42:20 +02:00
boot tests: boot: mcuboot_recovery_retention: Fix configuration issue 2023-07-20 15:13:49 +00:00
bsim Bluetooth: mesh: Update default values for transport SAR configuration 2023-07-19 11:07:07 +00:00
cmake tests: snippets: Rework the snippet test 2023-05-25 21:51:26 +02:00
crypto tests: cleanup metadata and filtering 2023-06-13 09:38:27 -04:00
drivers tests: drivers: enable tests eeprom and i2c for mr_canhubk3 2023-07-27 12:32:07 -05:00
kernel shared_multi_heap: Use proper enum instead of int 2023-07-26 07:56:39 -04:00
lib lib: json: add helper macro for named array of array 2023-07-26 09:11:16 +02:00
misc tests: misc: check_init_priorities: update output 2023-07-25 15:58:06 +00:00
net drivers: ieee802154: consistent high res timestamps 2023-07-28 09:06:35 +00:00
posix pthread: test: facilitate dynamically allocated thread stacks 2023-07-24 12:59:43 -04:00
robot Twister: Add integration with renode-test 2023-05-26 09:43:49 -04:00
subsys drivers: ieee802154: consistent high res timestamps 2023-07-28 09:06:35 +00:00
unit include: util: Add DIV_ROUND_CLOSEST helper 2023-07-21 10:49:41 +00:00
ztest tests: cleanup metadata and filtering 2023-06-13 09:38:27 -04:00
test_config.yaml twister: add support for levels and test configuration 2023-03-07 15:49:16 +01:00