MAX32 UART's "almost empty" fires when the FIFO gets down to one byte, but
when sending just one byte, no interrupt is raised, resulting in stalled
TX. Use a timer to ensure the ISR is invoked and TX processing continues in
that scenario.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
remove unneeded soft irq, as disabeled irqs
will still be registered, but just not propagated
to the cpu until it is enabled again.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
I manually checked the errata sheets for all STM32Hxx/STM32Uxx parts to
confirm the defect's presence or absence. It appears to have been resolved
in silicon on newer parts (e.g., STM32U3xx family), so hopefully this test
will not need grow further (knock on wood).
Co-authored-by: Nicolas Zuluaga <nicolas.zuluaga@rbr-global.com>
Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
Add a UART driver for the VIRTIO console device.
This driver has support for both polling- and interrupt-based i/o,
as well as interacting with up to 32 console ports (disabled by
default). Based on the Xen HVC driver.
Tested with the console subsystem sample programs. Aside from
enabling CONFIG_PCIE, setting CONFIG_HEAP_MEM_POOL_SIZE to a
high enough value (for example 100000) is necessary -- as is done
in the virtiofs sample.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Re-configure the registers if they re erased because of a STOP2 low power
mode.
Return the error code when re-initializing the UART after a STANDBY low
power mode.
Fix few typos and comments.
Run clang format on uart_stm32_pm_action()
Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
The uart_sam0_irg_rx_ready() function always returns true, even if
interrupt is disabled. This happens because the function do not
evaluate if the interrupt is enable of not. This fixes the issue
by adding the missing check.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Enable uart_elementary test and fix edge cases where the
configure function did not return the appropriate error code
when given invalid parity or flow control parameters.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Fix a bug where if CONFIG_UART_ASYNC_API was enabled in the config, the
interrupt flags would get cleared after the interrupt driven API callback
finished executing, causing data loss if data happened to arrive after the
callback but before the flags were cleared.
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
Add device deinit function. Support is optional as it is not widely
used and it enables pinctrl sleep state so it impacts memory footprint.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add support for the interrupt-driven API. Interrupts are
emulated using a polling thread.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is now possible to enable CONFIG_UART_INTERRUPT_DRIVEN for mspm0
uart driver.
Signed-off-by: Jackson Farley <j-farley@ti.com>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
The uart_stm32 driver gives no way for a user to
tell if setting a new baud rate was successful.
Propagate error checks up to the API level.
Signed-off-by: Eden Frosst <edenfrosst@gmail.com>
Fix compiler errors about variables potentially being used uninitialized.
These are false positives, as the compiler is confused by the
K_SPINLOCK() macro. Explicit initialization avoids these errors.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The dma driver was determining src_inc and dst_inc from the
config of the first block buffer and ignoring the config
flags for any additional buffers in the chain, which could
lead to incorrect transfers (e.g. in a multiple rx buffer
case, if the first buffer was to receive to NULL,
but the subsequent buffers were not NULL, the bug
would manifest as all transfers being made with
dst_inc of 0). Change the driver to setup
each dma descriptor according to the addr_adj flag
of each block_buffer.
Add check that peripheral transfers have addr_adj set to
NO_CHANGE instead of assuming it, to help catch errors.
Also now check for invalid addr_adj request of
decrement, which this controller doesn't support.
Signed-off-by: Mike J. Chen <mjchen@google.com>
The p_context no longer has the const type, so all
Renesas-supported drivers need to be updated accordingly.
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Reorganize and update soc folder files for SDK-independance
Reorganize and update hal_bouffalolab files for SDK-independance
Reorganize and update soc dts files for SDK-independance
Update serial and pinctrl driver files for SDK-independance
Update ai_wb2_12f, bl604e_iot_dvk, and dt_bl10_dvk
to new bl60x support
and fixup openocd config of ai_wb2_12f
Signed-off-by: Camille BAUD <mail@massdriver.space>
Fixed build fail since 4c93fcd35b.
Fixed test run fail on Ambiq platforms.
Added Ambiq section in the test.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Transition nrf54h away from the soc specific gpd
(global power domain) driver which mixed power domains, pinctrl
and gpio pin retention into a non scalable solution, forcing soc
specific logic to bleed into nrf drivers.
The new solution uses zephyrs PM_DEVICE based power domains to
properly model the hardware layout of device and pin power domains,
and moves pin retention logic out of drivers into pinctrl and
gpio, which are the components which manage pins (pads).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add build asserts for "memory-regions" property in nrf drivers which is
required on targets with DMM for saadc, pdm, pwm, twim, twim_rtio, twis,
tdm, uarte, spim and spis. On targets where the property is not required
the assertion macro expands to nothing.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
UARTE20 and UARTE21 instances enable usage of pins on different
port, but require request for constant latency mode. Added
handling of such scenario in the driver. Added testcase
to cover it.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Change init priority from '55' to 'CONFIG_SERIAL_INIT_PRIORITY' to align
with how other serial devices are initialized.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
This commit adds config_get support for native_tty. This is helpful as
some driver code (e.g. u_blox m8) will error out if they can't read the
current configuration.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
This reverts commit fd88386a9f, it breaks
uart support on ITE platforms when PM is enabled but PM_RUNTIME is not,
possibly others as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Configure the initial pin state of the UARTE peripheral to SLEEP, not
left uninitialised. This fixes the pin configuration not being set until
the interface is used if `zephyr,pm-device-runtime-auto` is enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Ensure uart_configure() only updates UART parameters without
reassigning pin configuration. Pin assignment via pinctrl is now
restricted to the initialization procedure, guaranteeing pins are
set only when properly configured.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enhanced RX cannot be used when UART_x_NRF_HW_ASYNC is used so changing
default value to depends on.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In certain configurations timeout field is not present in the
data structure so preprocessor ifdef must be used instead of
compiler check.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The variable 'mask' was declared but never used in
uart_sedi_line_ctrl_set().
This commit removes it to clean up the code..
No functional changes.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>