The `z_nrf_grtc_timer_get_ticks()` function converts system ticks
to GRTC ticks. It gets the current system tick to calculate an
absolute GRTC value. The same does the test function to provide
an argument to be converted. If the system tick occurs between those
`sys_clock_tick_get()` calls the `z_nrf_grtc_timer_get_ticks()` will
take into account the newer tick while the test estimate bases on
the old tick value. Due to that the maximum result error is 1 system
tick minus 1 GRTC tick which equals (`CYC_PER_TICK` - 1) for GRTC
ticks.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Before this commit, the following bugs were present:
- When `CONFIG_BT_FILTER_ACCEPT_LIST` was set, connection establishment
was cancelled upon RPA timeout. This required the application
to restart the initiator every RPA timeout.
- When `CONFIG_BT_FILTER_ACCEPT_LIST` was not set, the RPA was not updated
while the initiator was running.
This commit unifies the RPA timeout handling for both these cases.
Upon RPA timeout the initiator is cancelled and restarted when
the controller raises the LE Connection Complete event.
The workqueue state is checked when restarting the initiator to prevent
it being restarted when the timeout is hit.
Corresponding test cases have been added to ensure that this
feature works.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Expectation: After calling `bt_disable()` it is possible to
use the Bluetooth APIs as if `bt_enable()` was never called.
This was not the case for `bt_id_create()`, it was not possible
to set the default identity. This prevented an application
developer to restart the stack as a different identity.
Keys also need to be cleared to avoid the following pattern:
1. Pair two devices
2. Central calls `bt_disable()` and `bt_enable()`.
The central will now generate a new identity address.
3. Connect the two devices.
4. Re-establish encryption. Now the central will try to use
the previously used keys. The procedure will fail
because the peripheral does not have any keys associated
with the new central address.
The API documentation is updated accordingly.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The test needs couple of more socket/file descriptors to work because
CONFIG_POSIX_API creates three more file descriptors namely the
stdin, stdout and stderr descriptors.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Test on STM32H573i disco board , only the Tx transfer is ok.
Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add APIs for changing the contents of modem chat matches
safely at runtime.
This allows for reusing a single modem_chat_match at the cost
of placing the match and its buffers in RAM.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add missing configuration files for the nRF5340DK
and missing configuration values for the unicast
samples w.r.t. buffer sizes and encryption.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The compilation was failing if IPv4 was disabled.
Also fix the IPv6 test so that they pass properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This was the source of assert failures.
If only they were enabled in the first place...
The issue is that in order to save on build time, these two tests build
only one image, from which two devices are
instantiated (`gatt_client_test.c` and `gatt_server_test.c`).
The double-registration happens as `BT_CONN_CB_DEFINE()` is build-time, and
is included in two files of the same image. Then _both_ images will end up
with both `connected()` `disconnected()` etc callbacks, which have logic
specific to their respective images/devices.
The patch uses runtime registration instead so each device only ever
registers its own callbacks and not the other device's too.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Changes for making the clock control api tests generic for
any board.
All the device subsys definitions were moved to its own folder
according to the clock compatible.
Also if the clock's async feature is not supported by the target,
the test is skipped instead of failed.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Test the registration of interrupt controller with the
intc_table and verify that thru the sw_isr_table APIs.
Verified registration with all 3 interrupt levels.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add APIs that accept an additional `level` argument, and use
that to call the respective functions. In some cases this can
reduce code complexity, especially when the level isn't known
at build time.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Previously the multi-level irq lookup table is generated by
looping through the devicetree nodes using macros & Kconfig,
which is hard to read and flimsy.
This PR shifts the heavy lifting to devicetree & DT macros such
that an interrupt controller driver, which has its info in the
devicetree, can register itself directly with the multi-level
interrupt architecture, which is more straightforward.
The previous auto-generated look up table with macros is now
moved in a file of its own. A new compatibility Kconfig:
`CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION` is added and
enabled by default to compile the legacy look up table for
interrupt controller drivers that aren't updated to support the
new architecture yet.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
VPR cores CLIC supports vectored mode only and can't be
disabled. Filter out `CONFIG_NRFX_CLIC` to prevent build
error.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Adding bt_tester support.
Adding bt_tester app build
with Twister for rd_rw612_bga board
Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.
Disable twister build on samples that are not meant to
be supported on this board, so exclude it from the test cases.
Update peripheral/central ht sample.yaml files
to test build for rd_rw612_bga.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Add missing nrf overlays to fix the sample at build time.
Copied from samples/drivers/watchdog/boards.
It is not clear why the build failure was not detected earlier.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Chosing by default in the prj.conf
PICOLIBC ensures we also use an embedded
libC even when built for a native target
and even if we dont set POSIX_API.
This ensures the test will build and pass
properly when built with default configuration
from command line without using the test yaml.
This change does not affect the build result
for other targets as those defaulted already
to PICOLIBC.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a timeout to the tests/drivers/rtc_api testcase so twister
can end properly when running with twister.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Implement a function bt_audio_get_chan_count that takes an enum
bt_audio_location and returns the number of channels in that value.
This PR fixes#69617
(https://github.com/zephyrproject-rtos/zephyr/issues/69617)
Signed-off-by: Babak Arisian <bbaa@demant.com>
Align grpcio version with logic2-automation package fixing its fail
on Channel.unary_unary() call with missing _registered_method argument..
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This is a follow-up to commit e53e5448ee.
In the above commit, the calls to `wdt_setup()` were modified to use
the `WDT_OPT_PAUSE_HALTED_BY_DBG` option to prevent problems with
flashing of boards after this test was executed on them (the still
active watchdog could interrupt such flashing), but this option
is not essential to the test itself. And if a watchdog driver does not
support pausing when the CPU is halted by a debugger (this is the case
for example for wdt_counter), it is not able to pass the test because
of that option. Add then the possibility to continue the test when
pausing by debugger is not supported.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Two API calls that are supposed to set up the watchdog are not actually
causing the test to fail, only error messages are printed. This patch
adds the proper return statements.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Test was not covering nrf54l15 which had Synth source bitfield
renamed. Changing the test to use Kconfig to determine if
Synth is present.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This patch removes all uses of the adv auto-resume feature in the audio
bsim tests, and instead makes all adv starts explicit.
The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.
Modified the comment to omit the scannable part
and corrected the connectable part.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
MCS OTS support doesn't implement OTS checksum and if this is globally
enabled assert is triggered.
[00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0
ASSERTION FAIL [ots_init->cb->obj_cal_checksum]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476
Callback for object calculate checksum is not set
This should be reverted when Zephyr issue #72471 is fixed.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit adds a custom target to tests/crypto/mbedtls in
order to verify that MbedTLS auto-generated files are up to
date.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Selecting `CONFIG_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.
Added `arm64` to the `arch.common.stack_unwind.symtab` test.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>