zephyr/samples
Rubin Gerritsen 9cb339166e Samples: iso_connected_benchmark: Fix invalid latency
The default transport latency was not valid.
Set it to a value that is large enough.
The minimum possible transport latency is 16580 us,
but this assumes the controller ignores the RTN=2.
If the controller uses the RTN=2, the transport latency will
be slightly larger than 30 ms depending on
how the controller chooses to setup the ISO link.

Therefore, we set it to 40 ms to ensure the default
configuration is valid.

How these numbers were found:

For unframed PDUs this is defined in Core_v5.4, Vol 6,
Part G, Section 3.2.2:
  Transport_Latency =
    CIG_Sync_Delay + FT * ISO_Interval - SDU_Interval

Because unframed PDUs are being used, the ISO interval needs
to be a multiple of SDU interval.
If MaxPDU = MaxSDU and the PHY is 2M, this results in that
the maximum subevent size is:
2120 * 2 + 2 * 150 = 4540.
For 2 CISes this is 9080 us > 7500
Therefore, the controller has to set the ISO interval to a
minimum of 15000 us in order to fit the packets.

Based upon this info, the controller has the freedom to ignore
or use the requested RTN=2.
1. Ignore -> NSE is 2: Minimum ISO interval is 15000 us
2. RTN = 2, Increase NSE: 4 * 4540 = 18160 -> ISO_Interval = 22500 us
3. RTN = 2, Increase the FT to 2, NSE = 2 -> ISO_Interval = 15000 us

For (1):
  Transport_Latency = CIG_Sync_Delay + 15000 - 7500
                    = CIG_Sync_Delay + 7500
For (2):
  Transport_Latency = CIG_Sync_Delay + 22500 - 7500
                    = CIG_Sync_Delay + 15000
For (3):
  Transport_Latency = CIG_Sync_Delay + 2 * 15000 - 7500
                    = CIG_Sync_Delay + 22500

As shown in Core_v5.4, Vol 6, Part B, Section 4.5.14,
CIG_Sync_Delay needs to be larger than or equal to the length of
all ISO events. That is, the sum of the subevents:

For (1): CIG_Sync_Delay = 2 * 4540 = 9080
For (2): CIG_Sync_Delay = 4 * 4540 = 18160
For (3): CIG_Sync_Delay = 2 * 4540 = 9080

This results in the following transport latencies:

For (1): Transport_Latency = 9080 + 7500 = 16580
For (2): Transport_Latency = 18160 + 15000 = 33160
For (3): Transport_Latency = 9080 + 22500 = 31580

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-09 14:16:34 -04:00
..
application_development cmake: align Zephyr module variable to EXTRA_ZEPHYR_MODULES 2023-05-23 16:40:21 +02:00
arch tests: samples: cleanup test tags, add integration_platforms 2023-06-02 04:47:06 -04:00
basic board: Adds MIMXRT1062-FMURT6 board support package 2023-05-18 14:08:06 -05:00
bluetooth Samples: iso_connected_benchmark: Fix invalid latency 2023-06-09 14:16:34 -04:00
boards Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
compression tests/samples: use integration_platforms more where it makes sense 2023-05-26 17:52:02 -04:00
cpp lib/cpp: Remove CONFIG_CPP_MAIN 2023-05-31 06:16:35 -04:00
drivers tests: drivers: dac channel structure has a buffered parameter boolean 2023-06-08 09:33:11 -04:00
fuel_gauge drivers: fuel_gauge: Add support for RSOC and ASOC 2023-05-19 13:40:19 -04:00
hello_world samples, tests: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
kernel tests: add kernel tag to all benchmarks and samples 2023-06-02 04:47:06 -04:00
modules samples: doc: fix dead links 2023-06-07 04:40:47 -04:00
net Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
philosophers tests: add kernel tag to all benchmarks and samples 2023-06-02 04:47:06 -04:00
posix samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
sensor samples: doc: fix dead links 2023-06-07 04:40:47 -04:00
shields samples: doc: fix dead links 2023-06-07 04:40:47 -04:00
subsys fs/littlefs/sample: Increase stack size 2023-06-07 13:38:44 -04:00
synchronization samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
tfm_integration samples: tfm: Re-commit psa_crypto sample 2023-05-26 14:00:18 -04:00
userspace samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
classic.rst doc: fix top samples doc index 2021-03-09 17:48:18 -05:00
index.rst drivers: Added fuel gauge max17048 2023-03-22 14:51:33 -04:00
sample_definition_and_criteria.rst Bluetooth: Remove point 6 of Samples Guidelines 2023-02-06 10:43:31 +01:00