We rename the nRF91 Dev Kit board target (nrf9160_pca10090)
to nrf9160dk_nrf9160. We update all associated references
in the supportive documentation and all nRF9160-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Do not attempt to build on all boards. Instead, do a build-only pass
of the generic test case on all boards with EEPROM support.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove the dts_fixup.h with a DTS app overlay file instead. We have
sensors that show up on both the I2C and SPI busses, and we disable
the sensors to match how the tests work currently.
The app.overlay utilizes the testing dts bindings to create test nodes
that should not conflict with any existing SoC nodes. Thus allowing the
test to run on any platform.
The dts overlay is structured such that i2c.dtsi and spi.dtsi are
generated with default values for required properties. We than update
device properties for those nodes that the defaults are sufficient for
one reason or another.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The board target for emulation of nRF52811 on nRF52840 DK, so far
known as nrf52811_pca10056, is renamed to nrf52840dk_nrf52811.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The nRF52840 DK board target, so far known as nrf52840_pca10056,
is renamed to nrf52840dk_nrf52840.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The IIS2MDC is a 3D digital magnetometer ultra-low power sensor
for industrial applications, which can be interfaced through
either I2C or SPI bus.
https://www.st.com/resource/en/datasheet/iis2mdc.pdf
This driver is based on stmemsc i/f v1.02.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Tests were added for the UART configure API in #22849. The existing test
implementation works, but suggested to reduce dependency between test
cases. This commit allows each test to run independently of each other
by removing the function call of uart_config_get() in the
uart_configure() test case, and uses the uart_config_get() test case to
confirm the value set and gotten/read.
Fixes#23459
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
Reworked calibration to not use HW platform which is not available on
some platforms (nrf53) and does not bring any value compared to using
system timer. Switched to use k_timer. Additionally, improved
calibration algorithm to request also LF clock before starting
calibration. This simplifies the algorithm because it does not need
to support disabling low frequency clock which in calibration.
Tests has been updated and simplified. Former tests relied on HW timer
event.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The ISM330DHCX is a ultra-low power IMU with a 3D digital accelerometer
and 3D digital gyroscope tailored for Industry 4.0 applications, which
can be interfaced through either I2C or SPI bus.
https://www.st.com/resource/en/datasheet/ism330dhcx.pdf
This driver is based on stmemsc i/f v1.02.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The bootloader on mec15xxevb_assy6853 clears the memory on reboot,
which would fail the wdt_basic_api test. Instead of simply exclude
the platform, add a build only test for this board so the watchdog
is being built to avoid build breakage.
Fixes#20301
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The IIS2DLPC is a 3D digital accelerometer ultra-low power sensor
for industrial applications, which can be interfaced through either
I2C or SPI bus.
https://www.st.com/resource/en/datasheet/iis2dlpc.pdf
This driver is based on stmemsc i/f v1.02
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Since commit 22326f6d99 got in, this test
requires that so-called NOP frames (bytes of value 0) are sent when no
TX data is provided. For nRF SoCs, the over-read character (ORC) that
is sent in such case is by default configured to the value of 0xFF.
Alter configurations for nRF boards so that 0x00 is used instead.
On the occasion, remove redundant selections of driver type in those
configurations (CONFIG_SPI_x_NRF_SPI[M]=y), as such selections must
be aligned with the value of "compatible" property in corresponding
nodes in dts, so there's no much sense in having them separately here.
Correct also the SPI instance to be used for nrf51_pca10028.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In most cases gpio_pin_configure()'s return value is checked in this
application; Coverity noted a case where it is not checked. Add a
check to make it happy.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert ak8975 sensor driver to utilize device tree.
This also supports the ak8975 embedded in a invensense MPU9150. In such
a case the device tree node should look something like, where the ak8975
is a child of the mpu9150.
mpu9150@68 {
compatible = "invensense,mpu9150";
reg = <0x68>;
label = "mpu9150";
#address-cells = <1>;
#size-cells = <0>;
ak8975@c {
compatible = "asahi-kasei,ak8975";
reg = <0xc>;
label = "ak8975";
};
};
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The UART API now supports configure and configure_get functions,
however no tests were written for those functions. This
commit adds the framework and implementing tests for configure
and configure_get for UART API.
Fixes (#12872)
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
To ease maintenance of samples and tests some SoCs define
CONFIG_WDT_DISABLE_AT_BOOT=y to disable the watchdog. Ensure the option
is set to n for samples and tests that require watchdog module not to be
disabled during boot.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The test checks for a correct implementation if HWINFO_HAS_DRIVER
is set, otherwise it checks for -ENOTSUP return value.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels. Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels. Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The test case no longer permits inferring input and output pins based
only on the presence of GPIO aliases. Stop allowing presence of GPIO
aliases to enable the test.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Fixes a timeout failure on the frdm_k64f board.
test_short_relative_alarm iterates 100x through a 3 tick loop, but some
platforms like frdm_k64f have a 1 second counter tick period and
therefore need more time to finish this test.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Successful execution of this test requires a board-specific overlay to
identify the test pins, and that the test pins be shorted together.
Document this requirement.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Some boards don't support level interrupts; respect their rejection of
the configuration.
Also correct the code intended to disable the interrupt from within
the callback when level triggers are tested. Note that the legacy
call emulation does not work: it's necessary to add a flag that causes
the interrupt to be disabled.
Also improve a diagnostic and fix the exit path for a failure detected
before the callback was installed.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Added subsys argument to the callback, updated one driver which
used it and test cases.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Since the callback enable and disable functions are deprecated, but
cannot be re-implemented in terms of other API, add back an old-style
interrupt configuration test that uses the deprecated flags and
functions in the way existing code would do. The test module
internally disables the deprecation warnings.
Remove the test for the deprecated read/write functions, incorporating
a basic check into the module that tests deprecated callback functions.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Use the new pin and interrupt configuration API.
NOTE: Because hardware is not available this has been build-tested
only.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add the common config structure as a prefix of the driver-specific
config structure and use the devicetree GPIO pin counts to initialize
it.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
IO extenders may provide input signals to LEDs or sensors where
leaving the signal undriven may result in increased power consumption
or misbehavior. The SX1509B powers up with all signals configured as
inputs. Provide a way to indicate which pins should be set as output,
and their initial signal level, when the device is configured.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Previously the check would fail if a higher pin was present in the
callback set. Callbacks should only be told about pins that are
relevant to the callback, so reject unless exactly the expected pin
was provided.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Exclude the mps2_an385/mps2_an521 as we try to run on qemu and that
doesnt support the GPIO/LED so the tests will fail. For now exclude
the platform completely until we can just do a sim run exclusion.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>