CC setting algorithm is handling a case when CC is too soon (next
tick from now). It was setting CC to one tick further in the future
if that was detected. Step was repeated if counter incremented during
setting CC and CC was behind the counter because of risk of setting
CC too late. In certain scenarios we might spend a lot of time in
that loop, especially if optimization is turned off. Test shown that
loop was executed dozens of time (up. to 700us). To prevent
prolonged execution whenever CC setting fails we set CC to one more
tick further in future.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
When a BIS disconnected, we removed the references between
the endpoint and the stream. This made it impossible
to later unbind the audio_iso when
broadcast_sink_cleanup_streams was called.
Fixed by unbind the audio_iso when we remove the reference.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Test assumes that system clock is slow enough so 1 tick timeout
will not expire before k_timer_start function exists. That is
not the case when system clock is fast (relatively to the cpu
clock). Increase the timeout and add synchronization point.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Use spisc_it8xxx2_regs instead of IT83XX_SPI_*** registers declaration
to fix in cros_shi_it8xxx2.c
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Adds a note on how to disable TrustZone on the board, to be able to
reflash non TrustZone samples. Without this step, flashing will fail
for non TF-M or TrustZone sample applications.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Configure through an overlay file, the nucleo_wb55rg board
for running the tests/drivers/uart/uart_async_api.
DMAMUX is used for transfer on channels 0 & 1 with
LPUART peripheral request 17 & 16.
No hw flowcontrol for this test.
Connect pin A0 & A1 of CN8 to PASS the test.
Note that I2C3 pin assignment might conflict (PC0 & PC1).
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Adding support for allowing user extension code to support deferring
anchor point moves. Refactored LLCP only.
Note: This is NOT supported by LEGACY LLCP impl.
KConfig'd by BT_CTLR_USER_CPR_ANCHOR_POINT_MOVE
Modified ll_conn_update API, to accommodate passing offsets
Modified CPR/CU context data structure
Modified CPR/CU procedure to handle anchor point move wait state
Fixed up unit tests, adding anchor point move cases to CPR/CU test
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
This adds the files related to MQTT-SN, with an additional exlude
to separate MQTT and MQTT-SN.
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
Add a page explaining the usage of the MQTT-SN library, the client
and the UDP transport, and add it to the `protocols` index page
next to MQTT.
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
Validate that basic lifecycling and usage of the MQTT-SN client
work correctly by providing a mocked MQTT-SN transport. Connection
setup and state changes are tested.
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
Validate that the encoding and decoding part of the MQTT-SN library
work correctly using prepared byte arrays of messages.
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
This sample demonstrates the usage of the MQTT-SN library over UDP.
It connects to a gateway, publishes to the topic "/uptime" and also
subscribes to "/number".
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
This commit adds an implementation of MQTT-SN v1.2.
The specification is available on oasis-open.org:
https://www.oasis-open.org/committees/download.php/66091/MQTT-SN_spec_v1.2.pdf
The following things are missing in this implementation:
- Pre-defined topic IDs
- QoS -1 - it's most useful with predefined topics
- Gateway discovery using ADVERTISE, SEARCHGW and GWINFO messages.
- Setting the will topic and message after the initial connect
- Forwarder Encapsulation
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
Add a sample presenting ipc_service working with icmsg multi endpoint
backend. The sample creates multiple instances of icmsg, one of them
consisting of two endpoints.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
The icmsg backend for ipc_service has a limitation of supporting only
on endpoint. This limitation is acceptable for many IPC instances.
However, some require to use multiple endpoints sharing a single
instance. To preserve the simple and the most efficient single-instance
backend, a separated backend is introduced implementing a wrapper
around icmsg core which adds multiple endpoints support.
There are two multi-endpoint ipc_service icmsg backends: one in the
initiator role, and the other one in the follower role. In a IPC
configuration one end of communication must be in the follower role
while the other one is in the initiator. The initiator initiates
an endpoint discovery handshake to establish enpoint identifiers for
requested endpoint names. The follower responds to requests sent by
the initiator.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
icmsg library was implemented as a ipc_service backend. It is a simple
library with minimal feature set. To preserve its simplicity while
adding more features it is useful to introduce separated ipc_service
backends with added features. To reuse most of the icmsg code for the
simplest backend and other including more features, the core of icmsg
is separated from the simplest ipc_service to an icmsg module which
can be used by multiple backends.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
Using a macro instead of repeated identical code for validation
Use macro for pdu length field encoding
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
The reference count, dp->sref, is never incremented for the SSP DAI as
we use the runtime PM API's to probe/remove the DAI during
resume/suspend. Therefore, use the DAI state to check if the DAI is
active in any direction before proceesing to set the config. This fixes
the IO errors seen during simultaenous playback and capture on the same
SSP.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The mem_map test was skipped on all the phsical x86 boards when
running twister to test them. This error happens when migrating
the new ztest. Remove the incorrect platform allow to fix this
error.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
When read callbacks are used, it bypasses LwM2M engine data
handling and therefore LwM2M observation cannot work properly.
Read callbacks should be used only on special cases.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If gcc compiler option -Werror is used the warning,
declared inside parameter list will not be visible outside of this
definition or declaration [-Werror]
is treated as error, for
sockets_internal.h:18:28: ‘struct net_context’
sockets_internal.h:19:32: ‘struct zsock_pollfd’
fdtable.h:108:17: ‘struct k_mutex’
Signed-off-by: Christoph Schnetzler <christoph.schnetzler@husqvarnagroup.com>
Instead of guarding all BT ISO data log statements with
CONFIG_BT_DEBUG_ISO_DATA, a new macro, BT_ISO_DATA_DBG, is
implemented to handle the guarding.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Guard additional debug statements in ISO that deals
with TX/RX with CONFIG_BT_DEBUG_ISO_DATA to avoid spamming
the log.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add babblesim test for bt_disable which enables bt, starts a connection,
GATT discovers, reads, writes then disables BT in a loop.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
bt_eatt_init currently registers a l2cap server, however should not
register a new one if it has already been registered - for example in
bt_enable previously.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Init bt_workq in bt_enable so it can be safely disabled.
Cancel rpa_update work upon disable as it is no longer required.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Add bt_pub_key_hci_disrupted function for when hci is disrupted during
a pub key hci command, to clear callbacks and BT_DEV_PUB_KEY_BUSY flag.
Call this from bt_disable for the case bt_disable disrupts the pub key
hci command.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Reset disconnected handles as is no longer needed after disable.
Created a destroy function to clear all connection states and cancel any
deferred work.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Reset the adv_pool in disable so that advertising can be started after
re-enabling without issue.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
In bt_att_init, bt_conn_init and bt_l2cap_init, init the fifos and
slists before use. This means that they can be used after disable
without memory leakage.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Includes a fix for the scenario where a PHY update event
arrives at the same time as a disconnect event.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit adds a workflow to periodically clean-up the stale workflow
runs that are stuck in 'queued' state.
These stale workflow runs can result from occasional GitHub webhook
delivery mishaps and may affect the CI autoscaler decision making
process.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The `pthread_create()` function is not a cancellation point and
iterating over / mutating `posix_thread_pool` is not a blocking
operation, so use a spinlock for the internal `pthread_pool_lock`.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
A regression was introduced in ef804d8408
when the M_CAN driver was swapped to use the generic dcache API, but
cache management was not enabled on SAM devices.
Enable cache management on SAM devices when CAN_SAM is selected.
Signed-off-by: Perry Hung <perry@genrad.com>
The SAF XEC driver for eSPI was not enabled by default so sample
code for espi was failing. This commit changes the behavior to match
current scheme of enabling the drivers based on the status of required
device tree nodes.
Signed-off-by: Michał Barnaś <mb@semihalf.com>