Added return -ENOTSUP in uart_rx_enable() if RX pin is disabled.
Fixed power management call where TASKRX was started even though
RX pin was disabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extended nrf_uart driver to support TX only.
When RX pin is not provided then RX is not started at all. This
allows to achieve low power with logging/console enabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add a fixed clock to the qemu-virt-a53.dtsi to match how the musca dts
files work so we get the clock DT info in the same way in the driver.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This reverts commit 8739517107.
Pull Request #23437 was merged by mistake with an invalid manifest.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Replace all occurences of BUILD_ASSERT_MSG() with BUILD_ASSERT()
as a result of merging BUILD_ASSERT() and BUILD_ASSERT_MSG().
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
After RX is disabled during receiving, some bytes are received to
internal fifo. To not interfere with further transactions fifo has to be
flushed.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Convert driver to use DT_INST_ defines.
In the process, we've removed all UART/USART/LPUART code in
device instanciation code which had no impact.
Since all uart/usart/lpuart nodes declare compatibility with
st,stm32uart, DT_INST_X_ST_STM32_UART_FOO could be used.
Removed DT_UART fixup macros.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In the DT_INST conversion we introduced a typo bug of accessing port0
instead of port1 in the IRQ config function.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update device data with the activated configuration, so that it
will be remembered for follow up configuration get requests.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Change to code to use the automatically generated DT_INST_*
defines and remove the now unneeded configs and fixups.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
The sole purpose of init options has been to enable hardware flow
control on NS16750 when asked. Use the proper DTS tags for this.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Added locking for TX transfers between async and polling API.
Added safety counters for checking if transmission finished.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Add locking between async and polling tx transfers.
Add safety counters while waiting for transmission to finish.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Convert driver to fully use DT_INST_ defines. Currently IRQs are not
generated from DTS on esp32 so we create #defines for what they should
look like. Convert the IRQ defines to match DT_INST style so if/when
we have that info in DTS it will look the same.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update hal_nordic's revision, so that NRFX_ASSERT uses __ASSERT_NO_MSG
directly, not through the assert macro that comes from from libc,
as the definition of the latter might be different when some specific
libc version is used, and this could generate troubles.
Replace also uses of assert() with __ASSERT_NO_MSG() in nrfx driver
shims that use this macro without including the corresponding header
file (i.e. that implicitly rely on assert.h being included from
nrfx_glue.h, which is no longer the case).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The `irq_update` UART API function must always return 1 according to
the API documentations.
This commit fixes the `irq_update` API function to unconditionally
return `1`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The `irq_update` UART API function must always return 1 according to
the API documentations.
This commit fixes the `irq_update` API function to unconditionally
return '1'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Since driver is shared with other devices, it must be enabled
conditionally based on the number of instances. This avoid show
invalid options for devices with lower port count like SAM4S/SAM4E.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
SAMV71 uses same driver of SAME70 and this enables the feature. Since
driver is shared with other devices, it must be enabled conditionally
based on the number of instances. This avoid show invalid options for
devices with lower port count like SAM4S/SAM4E.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit fixes the multiple SERCOM interrupt handling for the SAM
D5x and E5x devices by replacing the obsolete device tree symbol with
the new `DT_INST` symbol.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.
Will do the defconfigs separately in case there are any complaints
there.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When building with LLVM we get the following error:
uart_stm32.c:272:9: error: implicit conversion from enumeration type
'enum uart_config_parity' to different enumeration type
'enum uart_config_flow_control' [-Werror,-Wenum-conversion]
return UART_CFG_PARITY_NONE;
~~~~~~ ^~~~~~~~~~~~~~~~~~~~
We shouldn't be mixing parity and flow control enum's. Use
UART_CFG_FLOW_CTRL_NONE instead or UART_CFG_PARITY_NONE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Current implementation directly passes timeout value to workqueue/timer
which results in assertion or instant timeout in case when K_FOREVER is
passed. This fix ensures that no timer or workqueue is called with
K_FOREVER.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Use signed values for timeout in UART asynchronous API, to be consistent
with timeout type in timer and workqueue values.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Extended nrf_uarte driver to support TX only UARTE instances.
When RX pin is not provided then RX is not started at all. This
allows to achieve low power with logging/console enabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Silicon Labs EFM32GG11B SoCs have more USART ports than
currently supported by the driver. Driver expanded with
support for USART4 and USART5.
Signed-off-by: Oane Kingma <o.kingma@interay.com>
The PrimeCell UART (PL011) IP can use one single combined/shared
interrupt line instead than different IRQ lines for TX/RX/Err/... This
is the most common configuration supported in the Linux world but not
currently supported in Zephyr. QEMU emulates a PL011 UART with a single
interrupt line as well.
To support this configuration we have to hookup the PL011 driver with a
shared IRQ driver and add two new configuration options when the shared
IRQ line is used.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
There is only one possible command, so just use if instead of switch
to avoid several MISRA-C violations and also avoid set dev_data wrongly
unused when UART_NS16550_DLF_ENABLED is defined.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Commit 68a235932f changed this driver to
not use hard-coded options. The problem was that these options were
never being set. This commit just set an initial value that can be
changed later.
Fix 68a235932f
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The NS16550 UART driver is currently hard-coded as 8-n-1
with no flow control. The baud rate is set by what is in DTS.
This commit moves away from hard-coded and strictly DTS to
configurable using the UART configure API. Requires commit #bcb807.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
The UART configure API was added to uart.h and this commit
implements the initial framework for the configure API for
the ns16550 uart. This includes the configure() and config_get()
functions and uart device configuration structures of the uart
configure API for the ns16550.
Note this commit does not resolve the pre-existing hard-coded
8-n-1 implementation.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
The SoC, driver, and board support for the CC2650 and CC2650 Sensortag
aren't currently supported and we are removing them as such. If anyone
is interesting in supporting this platform we can easily recovery it
from git.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
These were unintentionally omitted. We don't expose callback
registration or callback response APIs for security reasons.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Nrfx_uarte uses a hardware timer/counter to count received bytes.
Keeping this timer enabled increases power consumption for some SoCs.
This change disables the timer when an inactive power state is set.
Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
Refactors the mcux lpsci driver to use generated device tree macros
directly. Removes now unused dts fixup macros from i.mx rt and kinetis
socs.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Refactors the mcux uart driver to use generated device tree macros
directly. Removes now unused dts fixup macros from kinetis socs.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Refactors the mcux lpuart driver to use generated device tree macros
directly. Removes now unused dts fixup macros from i.mx rt and kinetis
socs.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
calling UARTE power management with DEVICE_PM_SUSPEND_STATE
then DEVICE_PM_OFF_STATE causes a deadlock in while loop.
It waits for an event witch never comes
Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>