Switch from native_posix to native_sim as default test platform.
For test with overlays, switch overlays and platform_allow from
native_posix to native_sim.
For tests without overlays, enable also in native_sim, and
set native_sim as integration platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add multiple channels in overlay to test the sequencer.
Change clock source to correctly pass the test.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for npcx4m8f_evb board that is a development platform to
evaluate the Nuvoton NPCX4 embedded controller.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Fixed pinout in adc overlays to align with board
Allowed adc driver sample
Added overlay for gpio_basic_api test support
Added overlay for i2c_api test support
Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
This is the final step in making the `zephyr,memory-attr` property
actually useful.
The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.
With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.
The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).
For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-attr = <( DT_MEM_VOLATILE |
DT_MEM_NON_CACHEABLE |
DT_MEM_OOO )>;
};
The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-region = "NOCACHE_REGION";
zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
};
See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).
The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
DT_MEM_SW_ALLOCATABLE )>;
};
Or maybe we can leverage the property to specify some alignment
requirements for the region:
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-attr = <( DT_MEM_CACHEABLE |
DT_MEM_SW_ALIGN(32) )>;
};
The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).
When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`
Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Support sampling more than 2 channels using the ADC API test. This
requires updates to the repeated samplings test, which samples using 2
channels even when more channels are defined by the ADC test overlay.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
To allow the ADC API unit test to skip tests for non-implemented
features, return -ENOTSUP.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
If the driver does not implement an optional feature, then skip the test
if -ENOTSUP is returned.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
This updates the configurations for these two boars to match the expected
best practices for new boards, as discussed in #61140.
Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
Add `yd_esp32` board:
- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E
Signed-off-by: Julio Cesar <hi@jcsx.dev>
This board is a relatively inexpensive development kit for USB-PD
controllers, using an UPD301C controller.
This Zephyr config includes support for:
* UART (present on he debug header of the board), tested with the
hello_world sample application;
* the one standalone LED (CAP_MIS), tested with the blinky sample
application;
* the rotary encoder (PDO_SEL), via ADC, tested with the adc sample
application;
* the current sense amplifier (I_SENSE), currently untested;
* the SPI bus, connected internally in the UPD301C to the UPD350;
* the I2C bus, exposed on the debug header, currently untested.
Note that the drivers.uart.async_api.rtt has to be disabled, as it is
for other m0 boards with no dma or it fails to build.
Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
Adds support for the NXP VMU RT1170 board. This Vehicle
Management Unit based on the i.MX RT1176 brings a fantastic
combination of sensors and IO all on one board for development
of various systems. It is also the featured board for
CogniPilot's Cerebri - VMU autopilot software based on Zephyr.
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Enable adc0 with 2 channels 22, 23 on standard group with
normal end of conversion callback. Channels correspond to
VREFL(0V), VREFH(3.3V).
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
Remove virtual esp32 board and replace it with the
real word boards:
- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Increase hardware sampling interval to 30ms for MCUX ADC16. The ADC
callback in the repeated_samplings test takes roughly 27ms to execute,
so a sampling frequency of this interval still allows the ADC test to
verify the ADC is being sampled at a given interval, while avoiding the
pitfalls that result from a kernel timer shorter than the duration the
ADC callback takes to run.
Fixes#58467
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
- The boards\arm\cy8cproto_063_ble board now has ADC enabled
- This includes overlay files for the test app and sample app
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Effort has been made to abstract the features that are common
to both the Pico and Pico W into a shared file when possible.
This commit does not include the addition of bluetooth or wifi
drivers for the W's Infineon module.
Signed-off-by: Dave Rensberger <davidr@beechwoods.com>
Enable ADC support for RT1040 EVK. Tested using samples/drivers/adc,
using channels 3 and 4 of ADC0.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
add platform_allow nucleo_h743zi.
the twister test is now enable for tests/drivers/adc/adc_dma on board
nucleo_h743zi.
used on driver st_stm32_adc with CONFIG_ADC_STM32_DMA =y.
Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now
Signed-off-by: Bill Waters <bill.waters@infineon.com>
This file adds the board overlay file for the `efr32xg24_dk2601b` board
to enable the `drivers.adc` test on this board.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit adds support for the `drivers.adc` test by adding an overlay
for the `efr32bg22_brd4184a` board.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Remove redefinition of adc0 node in native_posix overlay
since it's now present in the board dts.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Remove includes of adc dt-bindings header since these are
now already included in the root .dtsi file that adds an
adc node.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The below is the unit test result for the driver and kernel of
it82xx2_evb board.
GPIO/gpio_basic_api: PASS
I2C/i2c_api: PASS
Flash: PASS
UART/uart_basic_api: PASS
PWM/pwm_api: PASS
WDT/wdt_basic_api: PASS
KSCAN/kscan_api: PASS
kernel/sched/schedule_api: PASS
kernel/sched/preempt: PASS
kernel/timer/timer_api: PASS
kernel/sleep: PASS
ADC/adc_api: PASS.
ADC note: conversion time~=61.6us
sample time delay~=60us
wait voltage stable time~=202.8us
Set sampling time to 500us will pass for ADC test.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Remove shield, using this shild will require an overlay for
the particular board being used.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for atmel,sam-afec
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for atmel,sam0-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for atmel,sam-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for gd,gd32-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for telink,b91-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nxp,kinetis-adc16
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nordic,nrf-saadc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nordic,nrf-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for st,stm32-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nxp,kinetis-adc12
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for microchip,xec-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nxp,lpc-lpadc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nuvoton,npcx-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for ti,cc32xx-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for ti,cc13xx-cc26xx-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for ite,it8xxx2-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for nxp_mcux,12b1msps-sar
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for raspberrypi,pico-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for espressif,esp32-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move channel description to devicetree for infineon,xmc4xxx-adc
compatible to make the test more readable.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Adds the necessary definitions for the nucleo_h563zi to be able to run
the adc_api test on the ADC1 channel 15 (on pa3).
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Conifgures the new h573i disco kit board for testing the adc_api driver
on the ADC1 channel0 (on pa0).
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Change this test to use the automatically generated linker section
to place the buffer in SRAM4, instead of using the manually created
region added in 088d38f. This is in preperation of removing the
manually created section.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Microchip XEC ADC and ADC V2 driver were merged into one
That PR did not change the ADC API test and ADC shell resulting
in twister build failures. Fixed both ADC API test and ADC shell.
Signed-off-by: scott worley <scott.worley@microchip.com>
Update test/drivers/adc/adc_api to support the new channel configuration
method used by the LPADC driver.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
In 6e21ebf the sampling interval was changed, which caused the
issue #56070. This is fixed by allowing different boards to
specify a sampling period.
Also changed the test_task_with_interval to verify that
the supplied interval was used.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Previously the contents of buffers after an ADC DMA read was
simply printed, but not verified with an zassert that the
value was updated.
This commit updates it to be similar to the adc_api test that
fills the buffer initially with a known value, which is then
used to ensure the ADC DMA functioned successfully.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Adds nucleo_h732zi ADC DMA unit tests with multiple channels.
The STM32 ADC DMA driver requires the buffers to be placed
in a non-cacheable memory region as defined by the DMA.
Therefore this adds configurability to the test to change
the region the buffer is placed in.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
These test uses DMA which sometimes require buffers to be placed
in custom specific section. This is not compatible with ztest
userspace, which requires variables to be placed in a specific
partition.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
This test contained NXP specific functions, for example
the counter trigger, which is not required for all ADC DMA implementations.
Also moved NXP specific kconfigs to appropriate board files
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds support for the Adafruit ItsyBitsy nRF52840 Express.
This board ships with the UF2 bootloader, so the device has
been set up so that Zephyr applications are flashed the
same way that other (Adafruit) firmware is flashed with the
UF2 bootloader.
This has been tested locally, and the button, blinky and
led_apa102 samples run without problems.
Signed-off-by: Embla Flatlandsmo <embla.flatlandsmo@gmail.com>
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Renamed the dma-buf-alignment field to a more explicit
and descriptive name dma-buf-addr-alignment.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add ADC API tests for the TI CC1352R1 LaunchXL, CC2652R1 LaunchXL and
TI CC1352R SensorTag boards.
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
Start testing adc_api on channel 1
for stm32w55 nucleo and stm32l562 disco boards
since the VREFINT on channel 0
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add support for rpi_pico board to adc_api test.
At this time, twister couldn't with rpi_pico board,
Test it built with west and checked the console output.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).
Automated using:
```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Now that ADC drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.
Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the ADC.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Seeed XIAO BLE is a tiny (21 mm x 17.5 mm) Nordic Semiconductor
nRF52840 ARM Cortex-M4F development board with onboard LEDs, USB port,
QSPI flash, battery charger, and range of I/O broken out into 14 pins.
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Changes:
- Copied over board files for blackpill_f401ce
- Changed appropriate soc dtsi from stm32f401Xe.dtsi to stm32f401Xc.dtsi
- Replaced any instance of F401CE to F401CC
- Added blackpill_401cc to adc test
In essense the blackpill_f401ce and blackpill_f401cc are the exact
same boards,
the f401cc variant of the stm32 mcu has lesser sram and flash than
the f401ce.
Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
The test_adc.c still have hardcoded information on a board basis,
that need to be added manually.
Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
This PR adds support for the RT1060_EVKB as a variant of the RT1060 EVK.
Blinky app tested locally on RT1060_EVKB.
Signed-off-by: Nickolas Lapp <nickolaslapp@gmail.com>
This commit adds support for EBYTE E73-TBB.
This board features Nordic nRF52832 chip.
It was tested with several samples such as blinky and buttons.
Signed-off-by: Michal morsisko <morsisko@gmail.com>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit adds support for the Arduino Nano 33 BLE Sense board.
The DTS is separated into a common dtsi and one DTS for each version
of the board. The sensors with existing drivers: hts221, lps22hb and
apds9960 are added to the DTS of the Sense version.
A startup delay is added to the vdd_env node. This is done to give some
time for the sensors VDD/VCC to go high before the sensor drivers are
initialized.
The functionality was verified using the driver sample of each sensor.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>