Resume the TX Data Q when a LL_UNKNOWN_RSP is recieved instead of a
LL_PHY_RSP.
Update PHY Update unit test with more coverage of the TX Data Q pause
state.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Updated the instance with the device id to have it in the summary
report also when using pytest harness.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Update outdated links. This includes a new repository address for the
Golioth OTA sample and an updated path for the OTA documentation.
Signed-off-by: Mike Szczys <mike@golioth.io>
LTO cannot be really used with the native simulator based
targets neither today.
When doing a partial link as we do for these targets
the linker will complain if we are mixing LTO and non LTO
built code, and fall back to only produce non-LTO output.
(The link warning will cause twister to fail the test)
Today not all inputs to this partial link are built
with LTO enabled (offsets.c and the app library are not).
Even if they were, the native targets are mostly
a test and debugging facility, so optimizations like
these are not beneficial in general.
Let's just prevent selecting LTO for these targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update MIPI DBI display migration note to match the correct display
configuration settings for reset and MIPI DBI command pins after ILI9xxx
display was transitioned to this API.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Change reset pin polarity for MIPI DBI SPI controller, so that the board
devicetree is responsible for setting the GPIO to active low, and the
driver always sets the pin to a logic 1 to reset the display.
Fixes#68562
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
If the channel suspend with draining fails on stop because of reasons
outside of the scope of the DMA driver (the peripheral is powered off
before trying to drain for example) we must continue and disable the
channel.
The channel can be released by the client despite of it remained enabled.
A new DMA channel request can pick the channel (as it is released) but
re-configuration is going to be skipped and the use of the channel is going
to fail. Then we will see the same drain timeout on channel stop again
since the channel retained the configuration which resulted the first
timeout.
The drain timeout was made fatal by an earlier commit which fixed the
WAIT_FOR return value handling.
Fixes: 6226f9e6e4 ("dma: dw: fix the return value check")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Documentation does not describe how to run QEMU on Windows.
Add description of steps needed to run QEMU and use QEMU
with Twister on Windows in Beyond the Getting Started
Guide. Add a reference to it in Aplication Development
section.
Tested using Windows 11 and QEMU installer from
https://qemu.weilnetz.de/w64/
Signed-off-by: Michal Smola <michal.smola@nxp.com>
The driver masked the return value of a pin read operation before
checking the error.
Thus not detecting a potential error and leading to logically
dead code, which was detected by coverity in CID 340853.
Anther instance XORs 1 before returning, resulting in an unexpected
return value;
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add a test that checks that both advertisers, the legacy and the
extended behaves identically when the stack is suspended, in particular:
- `bt_mesh_send_cb.end` callback is called with error code `0` for the
advertisement that the advertiser already pushed to the ble host
(called `bt_mesh_send_cb.start`),
- `bt_mesh_send_cb.start` callback with error `-ENODEV` is called for
every advertisement that was pushed to the mesh advertiser using
`bt_mesh_adv_send` function before the stack was suspended,
- `bt_mesh_adv_create` returns NULL when attempting to create a new
advertisement while the stack is suspended.
The `bt_mesh_adv_disable` is called from the work because calling it
from the `bt_mesh_send_cb.start` callback will cause a deadlock.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This will warn if any of the mesh module will try to send anything while
the stack is suspended. Not clear what to do here as both advertisers
(legacy and ext) behaves differently. The legacy advertiser has a
thread which is stopped after the `bt_mesh_adv_disable` call and any
sent advs after suspending the stack will stay in the pool until the
advertiser is resumed. The extended advertiser will schedule its work,
but then fail because `ext_adv->instance` value is NULL, but will call
`bt_mesh_send_cb.start` with error `-ENODEV`. What to do with these 2
behaviors is unclear at the moment. Ideally none of the mesh stack
modules should call `bt_mesh_adv_send` after the stack was suspended, so
if this warning appears, the faulty module wasn't stopped properly and
this should be fixed. If not to add the adv to the pool, then it kind
of gets lost as the implementation probably expects one
of `bt_mesh_send_cb` callbacks which will never be called. Leaving the
warning until clear customer request comes.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit changes error code returned by `k_sem_take` when it times
out from `-EAGAIN` to `-ETIMEDOUT` because `bt_le_scan_start` also
returns `-EAGAIN` if bt device is not ready, which may lead to invalid
test behavior.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
By default, the DFU sample uses 0x0005 as PID in the Run-Time descriptors,
and when detached to the "proper" DFU mode, it uses 0xFFFF (one of the
values suggested by the DFU 1.1 spec).
So, 0xFFFF added to the table as well as indications of Run-Time and
DFU mode on both DFU entries.
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
WIFI scan result shows junk character in SSID because of
the length of ssid is maximum(32 character) which leads
to buffer overflow. It required one character for null
terminator ‘\0’.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
During local testing with UBSAN enabled, warning was reported:
bluetooth/host/l2cap.c:980:25: runtime error: member access
within null pointer of type 'struct k_work_q'
It turned out that le_chan->rtx_work.queue can be NULL.
Since null-pointer dereference is a UB, additional check
was added to ensure we don't access
`le_chan->rtx_work.queue->thread` when
`le_chan->rtx_work.queue == NULL`
The same changes applied to l2cap_br.c
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
During local testing with UBSAN enabled, warning was reported:
bluetooth/host/iso.c:237:2: runtime error: null pointer passed
as argument 2, which is declared to never be null
It turned out that when datapath doesn't contain
codec information, cc_len is 0 and cc is NULL
In order to avoid UB,
now we call memcpy only when cp->codec_config_len > 0
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
during local testling, UBSAN reported the following warnings:
- bluetooth/host/adv.c:2067:19: runtime error: shift exponent
255 is too large for 32-bit type 'long unsigned int'
- bluetooth/host/scan.c:828:18: runtime error: shift exponent
255 is too large for 32-bit type 'long unsigned int'
It turned out that we can't use BIT() macro directly on
bt_hci_evt_le_per_advertising_report::cte_type field.
According to Core Spec, `cte_type = 0xFF` corresponds
to `No contstant tone extension`.
Added separate function to convert CTE bit field from
HCI format to bt_df_cte_type
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
Use _current_cpu->id instead of CURR_CPU since that works
with/without multicore and contains additional checks.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
If `CONFIG_BT_MESH_GATT_SERVER` is disabled or the advertising set
doesn't support proxy adv, the solicitation PDU will not be sent.
However, solicitation PDU transmission doesn't depend on the proxy
feature of the device it sends. Therefore, solicatation PDU should be
sent regradless of `CONFIG_BT_MESH_GATT_SERVER` option and advertiser
tag.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Extend timeout to perform coverage analysis when testing on HW.
Coverage mode makes execution slower.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Used to perform coverage analysis when testing on HW.
Gathering coverage data require more stack,
so its needs to configurable.
There is used CONFIG_TEST_EXTRA_STACK_SIZE for that.
(with value depending on used HW).
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
The res param in offload_freeaddrinfo is not used.
Mark it as unused, to avoid static analysis complaining about
Parse warning (PW.PARAM_SET_BUT_NOT_USED)
Fixes CID 316235
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Where advertisement, connection and disconnection is iterated over 5
times, to verify the reestablishment of extended advertisements when
iterating over multiple times. Additionally, the connection
unreferencing has been decoupled from the disconnect event on both
sides, to demonstrate the dependency of the recycle event.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Split into two separate builds: advertiser and scanner to emphasize
clarity and robustness during reestablishment of advertisements and
scanning.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Unlike SPI nodes, I2C nodes (i2c20, i2c21, i2c22 and i2c30) did not have
this required property.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
uart_emul_fifo_read() didn't regard the size arg, hence if the RX ring
buffer contained more data than the size of the input rx_data buffer
size, this could result in buffer overflow. This becomes more obvious
when configuring device tree property latch-buffer-size > 1.
Signed-off-by: Andreas Anderberg <andreas.anderberg@u-blox.com>
Removed the "operation" infix from the bt_gatt_authorization_cb
callback structure in the Bluetooth GATT header.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This reverts commit 780b12854c.
"drivers: ieee802154: nrf: cache radio channel"
Implementation affected RCP devices in openthread as MAC layer
does not call `Receive()` functions after transmit is done.
Additionally, after sending a frame to a new channel (for example
while discovery operation), radio switches to RX state immediately
after TX, but continues to listen on old channel for about 5ms,
until MAC layer calls `Receive` operation, forcing to change the
channel.
Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
The yaml uses `arch: riscv` while other boards specify either
`arch: riscv32` or `riscv64`.
Unify this by changing the value to `riscv32`.
Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
UAC2 explicit feedback sample currently fails twister device testing
with timeout. It is not really clear what twister expects to see on the
serial output when running the sample. Because there is no meaningful
way of testing USB <-> I2S communication, mark the sample with TBD
harness to silence the timeout.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Trigger erasing solicitation settings before calling
`bt_mesh_settings_store_pending` and `bt_mesh_prov.reset` callback.
The `bt_mesh_settings_store_pending` flushes every settings that is
pending to be erased. The `bt_mesh_prov.reset` callback must be called
as the last step because a user is free to do anything from this
callback including rebooting or reprovisioning the device.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add warning that file opened without R/W flags will have no read/write
access.
Remove suggestion for using fs_open to check if file exists.
Clarify -ENOENT return reason.
Fixes#64030
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
* Update the HW models module to
52d0b4b7b7431d8da6222cc3b17a8afdcb099baf
Including the following:
* 52d0b4b UART: FIFO backend: Do not error out if other side disconnects Rx
* 3582b68 UART: FIFO backend: Avoid possible race
* 414f160 AAR: Fix UBSAN warnings
* 24f5d3d PPI: Fix UBSAN warning
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This CL updates the event data returned by espi_reset.
Return 0 for eSPI bus in reset, and 1 for eSPI bus out-of-reset.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
This fixes CID 340851.
This should never fail, but it's also something that can be
easily verified.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This workflow runs in the background and does not report anything and
does emit failures. Remove for now until we have something that is
actionable.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>