This commit introduces a compatibility layer for older EUSART hardware
that lacks the RXTO interrupt. It fix the test uart_async_api when using
xg22 soc.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
When running uart_elementary on the xg22 SoC, some tests are failing due
to the lack of checks inside the configuration function. This patch adds
a check for the parity parameter.
I've also noticed an error in the ISR function where we check all the
ISR flags and not only the enabled ones. It has no impact but needs to be
changed in order to be accurate.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
When cyclic mode is enabled, do not disable RX.
This mode ensures continuous availability of RX buffers.
Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
Use of uart_nrfx_uarte2 driver was deprecated before 4.1 release
and now can be removed.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Use LL_USART_DisableDMAReq_RX to disable UART RX DMA requests.
This should be called before entering shutdown mode.
Force to use UART_STM32U5_ERRATA_DMAT_LOWPOWER
when POWEROFF is selected. This ensure the system to shut down
properly instead of hanging due to DMA staying active.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
For all STM32 drivers and SoC, replace the READ_REG macro and the
LL_xxx_ReadReg functions (defined in the STM32 HAL) by
stm32_reg_read defined in Zephyr.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove the handling of cross domain pins from nrf drivers. To use
cross domain in tests, force on constlat and disable power domains
for the test.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Clocks are requested automatically by hardware on the nRF54H.
Remove additional handling from device drivers, and disable
the now unmanaged clocks in the devicetree.
Updates:
- can_nrf
- counter_nrfx_timer
- uart_nrfx_uarte
- spi_nrfx_spim
- spi_nrfx_spis
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Return an error if trying to send data using a suspended UART,
instead of blocking, possibly forever, for a transmission that will never
succeed.
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
At high baudrate when using async api of the uart, the abort
function in not giving the right informations since we're stopping
the dma after getting the status of it. It makes the uart_async_api test
failed on high baudrate.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch correct a bug where the uart/eusart tx callback might be
triggered before the dma complete callback at high baudrate when using
async transfer.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The Kconfig symbols for selecting HAL content should be part
of the HAL module integration, not defined by the SoC. Split the
symbols between the Series 0/1 Gecko HAL and Series 2 SiSDK HAL
when moving them.
For now, the Series 0/1 HAL symbols retain their name, while new
names consistent with the symbols already defined in the module
integration layer are used for the Series 2 HAL.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Replace CONFIG_PM with CONFIG_PM_DEVICE to include pm_lock
in cc23x0 UART driver in struct uart_cc23x0_data
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
This commit adds the following functionality support:
1. More baudrate setting.
2. 7 bit data moded.
3. Tx (CR_SOUT) and Rx (CR_SIN) signal invert.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Fix an issue where it was not possible to use a console port for
receiving data when the console port was added after receiving was
already requested
Signed-off-by: Max Meidinger <mmeidinger@internships.antmicro.com>
The DMA configurations for TX and RX were mixed-up
letting the DMA RX channel not fully configured.
This fix correctly configures the DMA RX channel
with DMA_ADDR_ADJ_NO_CHANGE.
Signed-off-by: Rémy Dziemiaszko <remy.dziemiaszko@smile.fr>
Spinlocks in functions virtconsole_control_recv_cb and
virtconsole_send_control_msg were unnecessary since those were called
from virtio_pci_isr or virtio_mmio_isr, which already use spinlocks.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
There was a bug in the VIRTIO Console driver which could cause a deadlock
by attempting to add buffers to the control-tx virtqueue too fast and
with an infinite timeout.
This commit fixes it by placing messages that couldn't be sent in a FIFO
queue and taking care of them later in a callback function.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Update serial driver support for RX MCU:
- Add DTC support for SCI UART driver.
- Implementation Async APIs for serial driver.
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
Default to using DIRECT_ISR if nothreading. This allows the SW ISR
table to be excluded if nothreading.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Handle the case where there are multiple different kinds of UART on one
platform, the other UART driver select SERIAL_SUPPORT_ASYNC but LPUART
did not, causing build error in LPUART driver. Shield LPUART driver from
this case by introducing driver config to indicate that in fact LPUART
is the one enabling ASYNC.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The conditions needed to declare `uart_ambiq_pm_action()` in
`uart_pl011_ambiq.h` and the conditions needed to use it in `uart_pl011.c`
differed, which would result in a warning promoted to error during
weekly CI runs.
Ensure that the conditions match to remove the warning / error.
```cpp
if defined(CONFIG_SOC_SERIES_APOLLO3X) || \
defined(CONFIG_SOC_SERIES_APOLLO5X)
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
flushing rx pending already happens in
uart_litex_fifo_read, which should be called
by the callback, so don't do it again, also
it can lead to the drop of chars, as flushing
removes the current entry in the fifo.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
In several functions, the UART registers are accessed multiple times
through the `get_uart(dev)` inline function. This results in repeated
dereferencing of the device's base address.
This commit caches the UART register struct pointer in a local variable
`uart` at the beginning of each relevant function.
For registers where repeated access is not needed, the value is read once
into a temporary variable. Modifications, if any, are applied to
the temporary copy, and the result is written back once.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Refactor low power state handling to not tie to zephyr,disabling-states
and define it's own separate "low power states" property in DT instead.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Use the RTO interrupt for RX timeouts when using the async API.
The workqueue based approach is sensitive to load and has a higher latency
than using hardware timeouts.
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
This commit enables the pm device runtime driver support
for the uart_ns16550 driver (only for devices that have an
associated power domain enabled).
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
just disable irq and not plush pending events,
so we don't loose them, when they are enabled
again.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>