It enables the usart6 to run the testcase with a DMA
tests/drivers/uart/uart_async_api. DMA2 (of type V1)
is configured on channel 5 (request) streams 7 & 2.
USART Tx and Rx PG14 - PG9 pins (14 & 16 of CN10)
are connected to PASS the test.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Allow UART driver that offload interrupt processing
to workuqueue, like CDC ACM UART to work.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sets the dts of DMA for using pn the uart 2 i.
The stm32h723 has a DMAMUX and request are 44 and 43 for usart2
The Tx&Rx pins PD5 and PD6 of the usart2 are connected
on the nucleo_h723zg board to pass the test
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add configuration for testing the usart3 through the dma1
on the nucleo_l152re target.This test requires the Tx pin
to be connected to the RX pin on the board.
Pin definition is added for this usart instance.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The verb tense for the suspended state was not consistent with other
states. The likely reason: state was being used as a command/action.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The difference between low power and suspend states is a thin blur line
that is is not clear and most drivers have used indistinctly. This patch
converges to the usage of the suspend state for low power, since
contrary to the low power state, it is used by both system and runtime
device PM. The low power state is still kept, but its future is unclear
and needs some discussion.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Based on the new bindings for the stm32 dma feature,
the overlay for enabling the dma on uart client is modified.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The callback is not used anymore, so just delete it from the pm_control
callback signature.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit configures usart3 to use dma in uart_async_api test
on nucleo_l552ze_q platform.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This commit configures usart3 to use dma in uart_async_api test
on stm32l562e_dk platform. Short pin2(PC10) & pin 3 (PC11) of usart3
in CN4 connector on stm32l562e_dk platform.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
Move all PM_DEVICE_STATE_* definitions to an enum. The
PM_DEVICE_STATE_SET and PM_DEVICE_STATE_GET definitions have been kept
out of the enum since they do not represent any state. However, their
name has not been changed since they will be removed soon.
All drivers and tests have been adjusted accordingly.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Added test which validates that uart device correctly handles
going to and from low power state.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Adds nucleo_g071rb board to the uart_async_api test.
Therefore additionally add usart1 in board definitions.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add test to check if uart_irq_is_pending() correctly returns 0 (meaning
there are no more RX and TX pending interrupts) when all RX and TX data
is processed.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
The SAM0 uart driver requires dma configured for async support and
the uart async support assumes all UARTs support async. None of the
atmel SAM0 boards are configured this way and thus the tests will
not currently build for these boards.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added low power configuration to testcase.yaml. In this mode
UARTE is disabled when RX and TX is not used.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This sets the dts of dma for using the uart asynch api.
The stm32l475 has a dmamux with request 2 for Tx/Rx usart4
The Tx&Rx pins (PA0, PA1) of the usart4 are connected
on the disco_l475_iot1 board to pass the test.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Set integration_platforms on these tests to just mps2_an385. This
should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds the asynchronous UART API testing support on the
nucleo_l4r5zi board.
The usart3 module is used as the secondary loop-back UART, which is
required to run this test.
Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
After finish transmitting some bytes might be in the
peripheral receive register, since the transmition
is still happening after reception disabled.
This patch ensures that the peripheral has no
bytes in its internal state.
Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
Added gpio_loopback to indicate that test requires pins to be
shorten. This allows to filter out tests on setup which does
not have pin setup.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extend the test_single_read test case to catch RX_RDY events that are
not expected to appear.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Added test which is calling uart_poll_out from various contexts and
asynchronous/interrupt driven API. Test is validating that calls
can be preempted at any moment and no data is lost.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The cached device pointer must be placed in memory that allows user
mode invocation of the test functions to access it.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a build only test to validate correct compilation of the uart_rtt
driver. No harness that connects to RTT is defined, and therefore the
test can't be run by CI.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It was already using uart_irq_callback_user_data_set below, now it also
uses uart_irq_callback_user_data_t as callback type, so let's normalize
the callbacks.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The device pointer is now provided to the callback, there is no need to
call uart_callback_set() with the device being set a user data.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
... because it is (required).
This makes a difference when building with CMake and forgetting
ZEPHYR_BASE or not registering Zephyr in the CMake package registry.
In this particular case, REQUIRED turns this harmless looking log
statement:
-- Could NOT find Zephyr (missing: Zephyr_DIR)
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- ...
-- ...
-- ...
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (target_sources):
Cannot specify sources for target "app" which is not built by
this project.
... into this louder, clearer, faster and (last but not least) final
error:
CMake Error at CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by "Zephyr" with
any of the following names:
ZephyrConfig.cmake
zephyr-config.cmake
Add the installation prefix of "Zephyr" to CMAKE_PREFIX_PATH or set
"Zephyr_DIR" to a directory containing one of the above files. If
"Zephyr" provides a separate development package or SDK, be sure it
has been installed.
-- Configuring incomplete, errors occurred!
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
A number of uart drivers may not implement the uart_configure and
uart_config_get APIs, if we get -ENOTSUP treat that as a skip.
Fixes#24355
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds the asynchronous UART API testing support on the SAM
E54 Xplained Pro board.
The SERCOM1 module is used as the secondary loop-back UART, which is
required to run this test.
Note that no external UART loop-back connection is necessary to run
this test, because the SERCOM1 UART TX and RX pads are configured to be
internally connected; it is, however, still necessary to configure the
pinmux because the module pads are not connected until the pinmux is
configured.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Convert DT_UART_{0,1}_NAME to DT_NODELABEL() references as the cases are
board specific and this allows us to remove DT_UART_{0,1}_NAME defines
in dts_fixup.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Substitute integral constants where call sites passed named constants
that have timeout values as arguments to parameters that expect
millisecond durations.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit adds the asynchronous UART API testing support on the SAM
R21 Xplained Pro board.
The SERCOM3 module is used as the secondary loop-back UART, which is
required to run this test.
Note that no external UART loop-back connection is necessary to run
this test, because the SERCOM3 UART TX and RX pads are configured to be
internally connected; it is, however, still necessary to configure the
pinmux because the module pads are not connected until the pinmux is
configured.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds the asynchronous UART API testing support on the SAM
D21 Xplained Pro board.
The SERCOM1 module is used as the secondary loop-back UART, which is
required to run this test.
Note that no external UART loop-back connection is necessary to run
this test, because the SERCOM1 UART TX and RX pads are configured to be
internally connected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Remove prompts from Kconfig options `UART_x_NRF_UART*` that select
the type of nrfx driver (for UART or UARTE peripheral) to be used
for a given instance. This prevents the options from being modified
from configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding UART node in devicetree.
This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between UART and UARTE for a given instance.
Since all `UART_x_NRF_UART*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
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>
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>