zephyr/drivers/ieee802154
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
..
CMakeLists.txt drivers: ieee802154: cmake: remove TI compile definitions 2022-07-28 20:51:55 +02:00
ieee802154_b91.c net: l2: ieee802154: deprecate NET_L2_IEEE802154_ACK_REPLY 2023-06-17 16:20:21 -04:00
ieee802154_b91.h drivers: ieee802154: b91: Fix Set Channel API and ACK detection 2021-12-14 13:47:25 -06:00
ieee802154_cc13xx_cc26xx.c drivers: ieee802154: cc13/26xx_subg: remove unused radio commands 2023-06-23 09:20:55 +02:00
ieee802154_cc13xx_cc26xx.h drivers: ieee802154: cc13/26xx_subg: remove unused radio commands 2023-06-23 09:20:55 +02:00
ieee802154_cc13xx_cc26xx_subg.c drivers: ieee802154: cc13/26xx_subg: fix PHY overrides 2023-06-23 09:20:55 +02:00
ieee802154_cc13xx_cc26xx_subg.h drivers: ieee802154: cc13/26xx_subg: remove unused radio commands 2023-06-23 09:20:55 +02:00
ieee802154_cc1200.c net: l2: ieee802154: document L1/L2 sep. of concerns 2023-06-17 16:20:21 -04:00
ieee802154_cc1200.h net: l2: ieee802154: standardize RSSI value 2023-06-17 07:16:32 -04:00
ieee802154_cc1200_regs.h
ieee802154_cc1200_rf.h drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
ieee802154_cc2520.c net: l2: ieee802154: deprecate NET_L2_IEEE802154_ACK_REPLY 2023-06-17 16:20:21 -04:00
ieee802154_cc2520.h drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
ieee802154_cc2520_regs.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
ieee802154_dw1000.c net: l2: ieee802154: deprecate NET_L2_IEEE802154_ACK_REPLY 2023-06-17 16:20:21 -04:00
ieee802154_dw1000_regs.h everywhere: fix typos 2022-03-18 13:24:08 -04:00
ieee802154_kw41z.c net: l2: ieee802154: deprecate NET_L2_IEEE802154_ACK_REPLY 2023-06-17 16:20:21 -04:00
ieee802154_mcr20a.c net: l2: ieee802154: deprecate NET_L2_IEEE802154_ACK_REPLY 2023-06-17 16:20:21 -04:00
ieee802154_mcr20a.h drivers: ieee802154: mcr20a: Remove unused variable 2022-06-29 06:02:28 -05:00
ieee802154_mcr20a_regs.h
ieee802154_nrf5.c drivers: ieee802154: consistent high res timestamps 2023-07-28 09:06:35 +00:00
ieee802154_nrf5.h drivers: ieee802154: nrf5: multiple CCA support 2023-07-25 09:13:41 +02:00
ieee802154_rf2xx.c net: l2: ieee802154: deprecate NET_L2_IEEE802154_ACK_REPLY 2023-06-17 16:20:21 -04:00
ieee802154_rf2xx.h drivers: ieee802154: rf2xx: Add support to Sub-Giga 2022-09-09 10:31:35 -07:00
ieee802154_rf2xx_iface.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
ieee802154_rf2xx_iface.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
ieee802154_rf2xx_regs.h drivers: ieee802154_rf2xx: Remove magic number 2023-02-10 18:13:48 +01:00
ieee802154_uart_pipe.c net: l2: ieee802154: document L1/L2 sep. of concerns 2023-06-17 16:20:21 -04:00
ieee802154_uart_pipe.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
Kconfig net: openthread: allow to configure CSL debugging 2023-06-17 07:48:25 -04:00
Kconfig.b91 drivers: ieee802154: IEEE802154 depends on NETWORKING 2022-08-05 12:56:47 +02:00
Kconfig.cc13xx_cc26xx drivers: ieee802154: cc13/26xx_subg: improve CSMA/CA compliance 2023-06-23 09:20:55 +02:00
Kconfig.cc1200 drivers: ieee802154: IEEE802154 depends on NETWORKING 2022-08-05 12:56:47 +02:00
Kconfig.cc2520 drivers: ieee802154: IEEE802154 depends on NETWORKING 2022-08-05 12:56:47 +02:00
Kconfig.dw1000 drivers: ieee802154: Move to using select in Kconfig for SPI bus 2022-08-12 11:33:02 +02:00
Kconfig.kw41z drivers: ieee802154: IEEE802154 depends on NETWORKING 2022-08-05 12:56:47 +02:00
Kconfig.mcr20a drivers: ieee802154: Move to using select in Kconfig for SPI bus 2022-08-12 11:33:02 +02:00
Kconfig.nrf5 drivers: ieee802154: nrf5: multiple CCA support 2023-07-25 09:13:41 +02:00
Kconfig.rf2xx drivers: ieee802154: IEEE802154 depends on NETWORKING 2022-08-05 12:56:47 +02:00
Kconfig.uart_pipe drivers: ieee802154: IEEE802154 depends on NETWORKING 2022-08-05 12:56:47 +02:00