This changes both k_mem_domain_add_partition() and
k_mem_domain_remove_partition() to return errors instead of
asserting when errors are encountered. This gives the application
chance to recover.
The arch_mem_domain_parition_add()/_remove() will be modified
later together with all the other arch_mem_domain_*() changes
since the architecture code for partition addition and removal
functions usually cannot be separately changed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This changes k_mem_domain_init() to return error values
instead of asserting when errors are encountered.
This gives applications a chance to recover if needed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For qemu_cortex_a53 on the mem_protect test, the test
test_mem_domain_init_fail() fails due to not having enough
translation tables. However, since ARM64 MMU asserts on such
condition, and k_mem_domain_init() also asserts when fails,
there is no way to distinguish these two assertions at runtime,
thus the test was considered passing. Fix this by allocating
a few more tables so the test will actually fail on
k_mem_domain_init().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For consistency we run the gatt and gap tests also with the new
LLCP. The test lists for legacy and new LLCP are identical
and therefor no separate test lists have been introduced
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Test is using logging in a different way and flushing logs
after each test case would not work.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Increase test coverage with simulation of reading IBECC_ECC_ERROR_LOG
and IBECC_PARITY_ERROR_LOG.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Rename the mockup file from ull_periph.c into ull_peripheral.c
so that it has the same name as its equivalent in the BT
controller
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
If IUT is acting as a central device and peer lost bond we need
to re-pair to restore bond. PTS is not sending any WID for this
so bonding needs to be initiated implicitly by IUT.
This was affecting GAP/SEC/AUT/BV-25-C qualification test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Increase main stack size (in 128 bytes) to make these tests run
successfully on qemu_x86 platform.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add tests for the instance based enum macros DT_INST_ENUM_IDX and
DT_INST_ENUM_IDX_OR.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use the host BIG Sync APIs to test the BIG Sync establish
and Sync Terminate implementation in the controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the bsim test_iso application so as to sync with periodic
adveritising. Increase the timeout so that the test passes.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Construction of BIGInfo with mandatory parameters and
placing it in the ACAD of Periodic Advertising PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added tests to check Broadcast ISO allocations are released
on terminate, and new Broadcast ISO create is successful.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove option CONFIG_USB_UART_CONSOLE where it has no influence
or enable CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR without taking
a detour through CONFIG_USB_UART_CONSOLE.
Check the compatibility of chosen property instead
of usage of CONFIG_USB_UART_CONSOLE option.
Align how to wait for the readiness of CDC ACM UART.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
drivers.flash.nrf_qspi_nor and drivers.flash.soc_flash_nrf:
keep nrf52840dk_nrf52840 as integration_platform
drivers.flash.default:
Use mimxrt1060_evk instead as integration_platform,
this is the only platform allowed.
drivers.flash.stm32:
Add a bunch of boards as integration_platforms for
this test configuration.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Pushes all work done in the topic-ble-llcp branch into main branch
This is a refactoring of the LL control procedures; the refactored
control procedures are hidden behind a KConfig option and
per default disabled
Goal of the refactoring:
close issue Link Layer Control Procedure overhaul #15256
make it easier to add/update control procedures
Refactoring consists in principal of writing explicit state machines
for the control procedures.
To reduce the risk of regression errors unit-tests have been added
Following control procedures are implemented:
Connection update procedure
Channel map update procedure
Encryption procedure
Feature exchange procedure
Version exchange procedure
ACL termination procedure
Connection parameters request procedure
LE Ping procedure
Data Length Update procedure
PHY update procedure
Min. nr. Of channels used procedure
Constant Tone extension request procedure
This is a joined work by the people listed in the signed-off-by
list (in alphabetical order)
Signed-off-by: Andries Kruithof Andries.Kruithof@nordicsemi.no
Signed-off-by: Erik Brockhoff erbr@oticon.com
Signed-off-by: Piotr Pryga piotr.pryga@nordicsemi.no
Signed-off-by: Szymon Janc szymon.janc@codecoup.pl
Signed-off-by: Thomas Ebert Hansen thoh@oticon.com
Signed-off-by: Tommie Skriver tosk@demant.com
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Prescaler was misplaced in pwm binding, instead of timers binding.
For example, TIM6/TIM7 doesn't have PWM capability,
but have a prescaler.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Add support of the tests/drivers/spi/spi_loopabck
with dma (V1).
Connect MISO pin (D12) to MOSI (D11) pin on the board
to pass the test.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patch is defining Tx buffers in NON CACHE memory for using
with DMA transfers. This requires the CONFIG_NOCACHE_MEMORY=y
flag when mcu is using CACHE.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This change updates the atomic tests to validate 32-bits on
32-bit architectures and 64-bits on 64-bit architectures.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The print specifier for `atomic_t` should be updated
to `%ld`, `%lu`, or `%lx` to account for the type
change of `atomic_t` to `long`.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Adjust the logging test case code to make them the same as other test
cases which deal with the CONFIG_USERSPACE used. It does not change
the original test logic, but just the file structure changed.
It also corrects the duplicated testsuite name of logging testcases.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
Enable ISO (unicast and broadcast) for the BT shell.
This allows users to use the ISO features (if supported by
the controller) in the shell.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds support for reading multiple variable length characteristics.
Previously read_multiple() always set the variable flag to false.
This is used by GATT/CL/GAT/BV-03-C.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
A FEM in this case is an external Front-End Module. This is basically
a range booster with some extra amplification in the TX and RX paths.
This feature is supported for the Nordic open source controller. See
the changes to the ubx_bmd345eval_nrf52840 board for a quick summary
of what you have to do to take advantage of this.
(This patch doesn't actually remove the feature in the openisa HAL,
though, because that never implemented the required GPIO handling
routines.)
We are using the 'fem' property previously added to the
nordic,nrf-radio's devicetree binding, which points to the FEM that is
in use. If you have this property and the node it points to is
enabled, the controller subsystem respects it. Otherwise, FEM support
is disabled.
This obsoletes the following Kconfig options, which are now unused:
- CONFIG_BT_CTLR_GPIO_PA
- CONFIG_BT_CTLR_GPIO_PA_PIN
- CONFIG_BT_CTLR_GPIO_PA_POL_INV
- CONFIG_BT_CTLR_GPIO_PA_OFFSET
- CONFIG_BT_CTLR_GPIO_LNA
- CONFIG_BT_CTLR_GPIO_LNA_PIN
- CONFIG_BT_CTLR_GPIO_LNA_POL_INV
- CONFIG_BT_CTLR_GPIO_LNA_OFFSET
- CONFIG_BT_CTLR_FEM_NRF21540
- CONFIG_BT_CTLR_GPIO_PDN_PIN
- CONFIG_BT_CTLR_GPIO_PDN_POL_INV
- CONFIG_BT_CTLR_GPIO_CSN_PIN
- CONFIG_BT_CTLR_GPIO_CSN_POL_INV
- CONFIG_BT_CTLR_GPIO_PDN_CSN_OFFSET
The PA and LNA pins are now specified via fem-specific devicetree
properties in the FEM node:
- The "generic" PA/LNA case is handled with the ctx-gpios and
crx-gpios properties of the generic-fem-two-ctrl-pins compatible,
respectively.
- If the fem is an nRF21540, use the tx-en-gpios and rx-en-gpios
properties instead (and also respectively). This allows us to specify
FEM properties in a way that makes sense for the hardware datasheet,
while still handling them in a uniform way within the controller.
We support this in the nRF5 HAL with a new radio_nrf5_fem.h
sub-header, which pulls in radio_nrf5_fem_generic.h or
radio_nrf5_fem_nrf21540.h depending on the fem node's compatible, if
one is defined. These in turn let us replace the implementation
routines in radio.c with DT equivalents.
Keep in-tree users and devicetree binding documentation up to date.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Recently there was added ADI support to periodic advertising.
There was missing implementation of ADI for periodic advertising
chained PDUs and direction finding. Also unit tests for periodic
advertising chains required update to handle ADI field.
The commit provides missing implementation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The current implementation relies on preprocessor concatenation to
work. This makes it incompatible with any content which expansion
is not a valid preprocessor token such as strings, pointers, etc.
and therefore limits its usefulness. Replace it with an implementation
that can cope with all cases.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit add the BabbleSim tests for the media control client, the
media control service and the media proxy. This is a part of the
upmerge of the le-audio media control files.
These tests have been developed and maintained along with the media
control functionality. The tests are believed to cover all
implemented media control functionality.
The commit is a pure copy of the files and content in the
topic-le-audio branch, with the exception that some include paths have
been modified to correspond to new locations of files and that the
tests have been guarded with ifdefs.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
test guards
Add entries for media control builds to testcase list. This is a part
of the upmerge of media control from the topic-le-audio branch.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Upmerge of the project settings for media control from the
topic-le-audio branch.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
audio.conf changes
TCP2 is no longer needed as it is the unique implementation since the
legacy one has been removed.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
With this commit a dedicated APPLICATION_CONFIG_DIR is added to the
Zephyr build system.
Currently, the APPLICATION_SOURCE_DIR is identical also the base
location of configuration files.
This is very practical for simple samples, but also has it limitations
for more complex setups.
Introducing a dedicated APPLICATION_CONFIG_DIR allows users more
customization options in Zephyr build system.
Especially in terms of custom build configuration files unknown to
Zephyr itself.
For example, instead of all configuration files being located directly
in the application source folder, a project might prefer to organize
their configuration files on a per board basis, for example:
<app>/boards/custom_board_A/prj.conf
<app>/boards/custom_board_A/app.overlay
<app>/boards/custom_board_A/custom_file.mine
<app>/boards/custom_board_B/prj.conf
<app>/boards/custom_board_B/app.overlay
<app>/boards/custom_board_B/custom_file.mine
...
instead of n-files located in the root of the sample.
If the user / sample specifies APPLICATION_CONFIG_DIR, then this folder
will always be used instead of the default configuration folder.
As part of this extension the behaviour of
`-DCONF_FILE=<relative-path>/prj_<build>.conf` and additional Kconfig
fragments automatic sourcing has been aligned with the default behavior
of `prj.conf`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The test identifier of timer error case in testcase.yaml is
exactly the same as timer api's test identifier.
So I fix this.
Signed-off-by: Lixin Guo <lixinx.guo@intel.com>