Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize the extended configuration and set p_reg using the devicetree
register base address.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Initialize p_reg with the register base address from devicetree.
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Add MAX42500 watchdog driver, including ability to configure voltage
monitors that can also generate reset conditions.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The nRF91 Serial Modem application restarts the PPP automatically,
which breaks our re-dialing attempts if network already recovered.
Instead, request to CFUN=4 and PPP to stop, so that rest of dial
script can assume correct ordering of events.
The sequence of
AT#XPPP=1
AT+CFUN=1
AT#XCMUX=2
is very timing sensitive, as the last command switches CMUX channels,
but cannot anymore do it if PPP already started on DLC channel 2.
This is a bad design of AT#XPPP command which we workaround.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If we stay in DORMANT state long enough, the CMUX channel might enter
power saving mode which will then block URC messages unless we deal
with RING event.
Also, change RING log level to DBG. It is too verbose otherwise.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If we receive PPP_DEAD event before receiving the DEREGISTERED, we
could directly try to recover connection without waiting in the
dormant state.
If we would stay in the DORMANT state, the PPP_DEAD event is not
going to happen againt, and it would deadblock.
Depends on the modem, which is received first.
There is no guarantee of ordering.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When packet domain events are requested with AT+CGEREP=1 we receive
these +CGEV events that indicate the state of data connection.
This might not always be the same as being "registered".
The information could also be used if we want to use the default CID
in the future.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Configure all nRF70 GPIO pins (BUCKEN, VDDIO_CTRL, SR RF switch) to
OUTPUT_INACTIVE state during driver initialization to prevent floating
pins from accidentally powering the module or affecting RF switch
before the interface is brought up.
This addresses an issue where GPIO configuration was delayed until
the interface was brought up for the first time, leaving voltage control
pins floating which could result in unintended power supply.
Fixes#100993.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Make cc13xx_cc26xx_irq_tx_ready check that the TX Ready interrupt
occurred, instead of checking whether there is some free space in
the UART TX FIFO. This prevents a race condition from occurring in
OpenThread Spinel protocol implementation, when a UART RX interrupt
is received right after otPlatUartSend was called, between the
assignement of 1 to ot_uart.tx_busy and the initialization of
write_length.
Signed-off-by: Pascal Bodin <pbodin@baylibre.com>
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Initial implementation of an adc driver for the ads79xx series of
spi-adc chips.
This driver sets the device in auto-1 mode, and supports devices
in the series, with different resolutions (12/10/8-bit),
and number of channels.
Signed-off-by: James Walmsley <james@fullfat-fs.co.uk>
make the rxtx size a define, as this driver
does not support any other value and it's
also not configureable in litex.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Fix race condition between DMA ISR and work queue that caused RX
length underflow when calculating len = counter - offset.
Both mcux_lpuart_async_rx_timeout (work queue) and dma_callback
(ISR) modified rx_dma_params without locking, causing the ISR to
update counter/offset mid-calculation, resulting in integer
underflow and system crash.
Solution: Add irq_lock() protection around all rx_dma_params
accesses in async_evt_rx_rdy(), mcux_lpuart_async_rx_flush(),
and async_evt_rx_buf_release().
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Split error handling in mcux_lpuart_rx_enable() to distinguish
between DMA status query failures (error) and busy status (debug).
- Use LOG_ERR for get_status failures with specific error code
- Use LOG_DBG for busy status (expected condition, valid -EBUSY)
- Improves debuggability by providing clearer diagnostic messages
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Different flash parts have different requirements on the number of dummy
bytes to send when issued a RDID request, so allow configuring the read ID
dummy byte count in devicetree for the MAX32 SPIXF flash driver.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Pass the selected channel and bandwidth to WHD, so the AP
enables on the requested channel/width.
Signed-off-by: Liu Gavin (CSS ICW ENG WFS SW WFSW 1) <Gavin.Liu@infineon.com>
Fix redundant initialization of vif_ctx_zep where the variable was
initialized at declaration and immediately overwritten before being
read.
Remove the redundant initialization to improve code clarity.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The Xen events channel driver consume 72K of RAM, but may not be
required in all use cases.
Added a XEN_EVENTS Kconfig option so that Xen events can be gracefully
disabled if not required. Updated the relevant CMakeLists.txt and
Kconfig files to guard the inclusion of the Xen events driver and its
source files by this option.
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
pwm_mcux_sctimer driver doesn't support power management actions.
PM Actions added, as well support to save/restore for pwm channels
configurations after exitig from PM3.
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
When an async transfer finished quickly, the internal state of
the driver could come out of sync with the hardware. The tx/rx
enabled flag and PM lock was taken after starting the DMA
transaction, which caused issues if the DMA complete callback
was called before the flags were updated. Set the flag and take
the PM lock prior to starting the DMA transaction to avoid this.
Also release the PM rx lock upon successful completion of a
transfer. The lock was previously only released when the user
manually called `uart_rx_disable()`.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add a device tree property to request connecting an instance to stdin/out
(on top of the command line option, and the kconfig option).
And clarify that the kconfig option applies to whichever is the
first instance in whatever order the DT logic happens to order them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
PLL mode on MSIK/MSIS should be enabled only if property `msi-pll-mode` is
present on the generator's DT node. However, the STM32U3 clock driver did
not check this property and unconditionally enabled PLL mode. This is an
issue because PLL mode requires an LSE generator to be provided, which was
asserted at build time, preventing usage of MSIS/MSIK without an LSE even
if the target application did not need the accuracy provided by PLL mode.
Fix by enabling PLL mode for each MSIx generator only if the `msi-pll-mode`
property is enabled on the corresponding DT node.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Harmonize the variable names frame_size, bytes_per_frame or word_size_bytes
by replacing them all with dfs, which is already used in the Zephyr SPI
driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Replace the direct read from the registers by dedicated LL functions
since that they are now available.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Define a single function to enable the DMA requests instead of duplicating
the same lines several times.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit removes some line breaks from function definitions that were
not needed since it can fit on one line.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
In case of error from the spi_stm32_shift_frames, spi_stm32_complete
could be called twice if one of the condition with the transfer directiion
were true. To prevent this, add a return after the call to
spi_stm32_complete.
Simplify the if/else block with a single if since spi_stm32_complete is
called in every case.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The functions spi_stm32_send_next_frame and spi_stm32_read_next_frame
already exist to send and receive next frame. Use them in slave mode
instead of doing it manually.
Additional checks with spi_context_tx_buf_on and spi_context_rx_buf_on are
done inside these functions but they are already done beforehand in slave
mode.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Create a new function that calculates and set the transfer size depending
on the transfer direction (for H7 compatibles).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The UARTE instance must be disabled before the pinctrl state is
updated like it is done other places in this driver.
While the uarte is enabled, it controls the pins, keeping TX high
for example. Trying to apply pinctrl will have no effect other
than enabling pin retention, so the TX pin which should now be low
and configured as disconnected input, stays an output driven high.
Issue was discovered as the suspended UARTE was backpowering
devices connected to it because of the driven output pins.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This change updates uart_stm32_dma_rx_flush() to detect the wrap case
and emit two contiguous UART_RX_RDY events in order:
- tail: [offset .. buffer_length)
- head: [0 .. counter)
This guarantees that each RX_RDY event satisfies offset + len <=
buffer_length.
Non-cyclic behavior and cyclic non-wrapping cases remain
unchanged.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
The work-queue based timing source ignored the interval passed via
.update() and always scheduled using the configured microstep interval.
In single-edge mode the step/dir driver programs the timing source with
half the microstep period to generate the required high/low edges, so
ignoring .update() causes the step toggling rate to be wrong.
Store the timing-source interval on update and schedule work using that
value.
Signed-off-by: Andre Stefanov <mail@andrestefanov.de>