Set the point-to-point flag because PPP is a point-to-point protocol. This
flag enables specific IPv6 neighbor discovery handling, to select the
correct sending interface. Without it set, a different interface might be
selected based on the destination address.
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
GCC version 14.3 does more extensive checking for potentially uninitialized
values and warns about a couple of arrays. Initialize them to zero to make
the compiler happy.
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix compiler errors about variables potentially being used uninitialized.
These are false positives, as the compiler is confused by the
K_SPINLOCK() macro. Explicit initialization avoids these errors.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
gcovr runs gcov to generate temporary coverage files into the gcov
working directory. The working directory defaults to gcovr's -r
argument.
When running twister with the --coverage-per-instance argument, multiple
gcovr instances may run in parallel. Since they all share the same gcov
working directory, they may interfere with each other, resulting in
errors like this:
AssertionError: Sanity check failed, output file
spinlock.h##4167b923a06cc9590c8eef372f016a6d.gcov doesn't exist
but no error from GCOV detected.
To fix this, specify a separate gcov working directory for every test
through gcovr's --gcov-object-directory option.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
In the multiple_central.sh test, same Central bonds with Peripheral
multiple times. Because Peripheral uses different identity for the next
bond, Host by default sees the conflict with the old bond and rejects
the new one. For the test we don't care about security and can simply
replace the old bond.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Calling `bs_trace_silent_exit` after successful test completion of one of
devices causes termination of the entires tests suite without letting
other devices complete the test.
This commit move `bs_trace_silent_exit` call to `test_tick_f` handler,
which is triggered when time set by
`bst_ticker_set_next_tick_absolute` expires.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
In addition to aligning the destination address of all connection
objects during the identity resolution phase, we also need to update the
corresponding address field in the `struct bt_keys` structure for each
of these connection objects.
If we don't do this, `bt_keys_get_type` for that connection won't find
the `bt_keys` structure in the pool and will allocate a new one. This
will result in orphaned `bt_keys` structures in the pool.
This completes the change done in https://github.com/zephyrproject-rtos/zephyr/pull/61030/commits/637dabc3c9b018f47dee656d2ca0fe8f2fa21984
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The event header is already accessed in `bt_recv_unsafe`. If length is
valid there, no point in checking it again in `hci_event` or
`hci_event_prio`.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
During debugging multiple.sh test, a race condition was observed where
advertiser state on Host and Controler was desynchronized.
Below is the sequence of actions led to this issue:
0. Host has queued few priority events at this moment.
1. Controller establishes a connection and stops the advertiser.
2. Controller sends to Host BT_HCI_EVT_LE_ENH_CONN_COMPLETE.
3. Host deprioritizes BT_HCI_EVT_LE_ENH_CONN_COMPLETE event and doesn't
process it immediately.
4. Controller sends to Host other priority events which are processed
immediately.
5. Host wants to disable the advertiser in order to update the Resolving
List (see `bt_id_add`).
6. Host sends to Controller BT_HCI_OP_LE_SET_ADV_ENABLE(Disable)
command.
7. Controller sends to Host BT_HCI_EVT_CMD_COMPLETE event on
BT_HCI_OP_LE_SET_ADV_ENABLE command.
8. Host prioritizes this BT_HCI_EVT_CMD_COMPLETE event, processes it
immediately and clears `BT_ADV_ENABLED` flag for the advertiser.
Note that Controller already has the advertiser disabled after
establishing connection on step 1.
9. Host sends few commands in a row and Controller sends
BT_HCI_EVT_CMD_COMPLETE events that are prioritized (see
`bt_id_add`).
10. Host wants to re-enable the advertiser after updating the Resolving
List.
11. Host sends to Controller BT_HCI_OP_LE_SET_ADV_ENABLE(Enable)
command.
12. Controller sends to Host BT_HCI_EVT_CMD_COMPLETE event on
BT_HCI_OP_LE_SET_ADV_ENABLE.
13. Host prioritizes this BT_HCI_EVT_CMD_COMPLETE, processes it
immediately and sets `BT_ADV_ENABLED` flag for the advertiser.
14. Controller has the advertiser enabled.
15. Host now processes the delayed BT_HCI_EVT_LE_ENH_CONN_COMPLETE
event.
16. Host resets the advertiser state, thinking the Controller's
advertiser is also stopped.
This commit prioritizes LE Connection Complete and LE Enhanced
Connection Complete events to drop advertiser state on Host immediately
once the corresponding event was received.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If connection is failed to establish, the sample will get stuck
eventually and won't do anything while it could re-start advertiser to
try establish a connection again.
This commit makes the sample restart the advertuser if such issue
happens.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When CONFIG_BT_PRIVACY is enabled, we cannot start an advertiser with an
RPA generated for a different identity than scanner role. Therefore, we
need to stop scanning.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds more logs to peripheral_identity sample improve clarity
of what the sample is currently doing.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds more logs to central_multilink sample improve clarity
of what the sample is currently doing.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
- "bt_tbs_set_uri_scheme_list()" function does not setting URI for
GTBS instance. Using "inst_lookup_index()" fixes issue to find
registered GTBS instance for provided bearer_index.
- "bt_tbs_set_uri_scheme_list()" function overrides URI scheme list
with latest provided list. But the expectation is that it should
keep previously added URI schemes and only update new scheme which
are not part existing list. Code is updated to fix this.
- The same function uses net-buf to combine all URI schems for all
TBS bearer if current request is not for GTBS instance. Currently,
the code only uses combined URI scheme list for logging purpose and
it is not used to send for URI Scheme notification to provide
updated GTBS URI scheme to remote. Code is now updated to add
dynamic buffer to add all TBS URI scheme list for GTBS instance
and notify it similar to other functions to optimise memory usage.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
If the chrc->uuid is somehow an invalid UUID, we log it and
terminate the discovery procedure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for executing the CM7 core directly from flash memory
(XIP - eXecute In Place) instead of copying to ITCM. This provides
the following benefits:
- Allows for larger code size than the 512KB ITCM limit
- Simplifies memory management for large applications
- Reduces boot time by eliminating the need to copy code to ITCM
The implementation includes:
1. A new Kconfig option CM7_BOOT_FROM_FLASH (default: n) to control
the execution mode
2. A device tree overlay (cm7_flash_boot.overlay) that configures
the flash memory for CM7 execution
3. Updates to soc.c to calculate the correct CM7 boot address
based on the flash partition
5. Documentation updates with instructions for both execution modes
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Some TBS API functions attempted to take the mutex
of an instance before the NULL check.
Reorder the checks of the functions, and also modify function
to be more similar (using the same terms and structure).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Improve reporting by introducing a configurable reporting interval
and make the report text more useful.
Change TX to always send the same size, as that is what is
expected/required by LE Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Make the reporting interval configurable to make it easier
to actually follow. Improve what gets reported.
Add check for SDU size to ensure correctness when not
using LIBLC3.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is temporary fix for SAADC power consumption. Need to be
removed after hal_nrfx version upgrade.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
This commit introduces a new devicetree property, bits-per-symbol, to
allow the symbol width to be configured from 3 to 8 bits. This change
is particularly beneficial for MCUs that lack DMA for their SPI
peripheral and have a limited hardware FIFO.
This property provides flexibility by allowing developers to select a
slower SPI clock frequency and use the symbol width to scale the
timings to meet strict LED strip requirements, minimizing the risk of
FIFO underruns.
Additionally, using higher-density patterns (e.g., 3-bit or 4-bit
symbols) makes more efficient use of the pixel buffer, which reduces
the RAM footprint required for the LED strip data.
The implementation is optimized with a fast path for the common 8-bit
symbol case, while a generic bit-packing loop handles all other
widths.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Use the device in register accesses. This allows to use this code with
multiple controllers instead of only the "chosen" one.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
The CI workflow runs on specific paths being touched, add the SDK_VERSION
as one of those paths.
Update to match the CI image with the actual SDK test
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
There are two main issues found with using DLC TX thread,
Issue 1, the RAM consumption. Every DLC will have a dedicated thread
and thread stack.
Issue 2, the thread stack overflow issue. There is no way to strike a
balance between stack size and RAM consumption. Since the deep of call
stack is depended on the upper layer, the thread stack needs to set by
application. Due to the thread stack of DLC is dedicated, RAM
consumption is the product of the added value and the number of DLCs.
Use a TX worker to replace DLC TX thread.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
When the `PTP_UDP_IPv6_PROTOCOL` configuration is enabled
the `mcast_addr` variable is defined as an IPv6 structure, which
doesn't have `s_addr` member.
To not introduce preprocessor guarded code blocks in functions
added union to represent both configurations: IPv4 and IPv6.
Fixes: #92975
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add PWM test support for Renesas RZ/T2M-RSK, RZ/N2L-RSK, RZ/V2L-SMARC
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>