When dealing with full frame write, ensure that the buffer content
is well flushed into memory so that the LTDC is able to access to the
correct data.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Rework the way stm32_ltdc_write function is written, splitting
into several functions in order to gain in readibility.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add I2C driver support for Renesas RZ/A2M
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
1. enable watchdog support
2. verified tests/drivers/watchdog/wdt_basic_api
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
This patch enhances the UART shell by:
- Adding a config command to display the UART configuration;
- Displaying the current configuration when the command misses the last
parameter (usefull for command line editing).
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Some time ago a receiver mode for newer SoCs was introduced. It is
using TIMER to count RX bytes via PPI. Due to changes in the system
behavior it is not the same implementation as the one used on
legacy targets (nRF52x, nRF53x and nRF91x). New implementation is
using the Device Tree to assign a TIMER instance and old feature was
using Kconfig which is now obsolete and error prone since it is
easy to get resource usage conflict is some instances are managed
in Device Tree and some in Kconfig.
As a result to reliably receive data without HWFC user had to use
different configuration depending on the target.
Legacy implementation was using nrfx_timer and new one used HAL.
Patch attempts to align better those two similar but different
implementations by:
- deprecating Kconfig symbols for selecting TIMER instance in favor
of the Device Tree
- extracting common part like PPI initialization and some control
block fields
- Using TIMER HAL in both implementations.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Interrupt handler was handling events in a following order:
ENDRX, RXSTARTED, RXTO. This could lead to error if RX buffer
is short then with high baudrate RXSTARTED for the current
buffer could be handled together with ENDRX and in that case
uart_rx_buf_rsp called from RXSTARTED would return error as
reception is already finished due to handled ENDRX.
Reworking the driver to change that order to RXSTARTED, ENDRX,
RXTO.
Additionally, driver is optimize to only check HW events for
enabled interrupts. To achieve that, RX path interrupts are
all disabled then RX is disabled.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
With writing to `master_rxtx_addr` the transfer starts
and with that the interrupt for rx can also come at any time after it.
If that interrupt happens during
spi_context_update_tx, it can lead to some undefined behavior.
In my case I got a `Load access fault` due to some later code,
then wanting to read a write only area. Probably
`tx_count` in `struct spi_context` being decremented one to many,
so it would be the max value of size_t.
Also we don't want to do `spi_context_update_tx`
before `spi_context_wait_for_completion()`. As
it contains `spi_context_total_tx_len()` and that
needs the not incremented `current_tx`.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
In case of a warm boot, e.g., a boot in Asymmetric MultiProcessing
(AMP), the responsability of the priority initialisation should be
on the host only, as the priority are not set per context.
Signed-off-by: Román Cárdenas Rodríguez <rcardenas.rod@gmail.com>
Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
Add riscv_plic_irq_complete and make it available for kernel.
This is useful for Asymmetric MultiProcessing (AMP) configuration,
where the platform can be rebooted from the host side and the request
is processed in a interruption context.
Signed-off-by: Román Cárdenas Rodríguez <rcardenas.rod@gmail.com>
Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
Replace hardcoded numeric timeout values with named HL78XX_CMD_TIMEOUT_*
and HL78XX_SCRIPT_TIMEOUT_* constants. These values follow the HL78xx
AT Command Reference Guide recommended timing ranges.
Update all chat script definitions to use the new timeout groups:
- FAST, SHORT, MEDIUM, LONG, VERY_LONG, EXTENDED command timeouts
- INIT, POST_RESTART, PERIODIC, NETWORK, POWEROFF, GNSS script timeouts
This improves maintainability, avoids duplicated magic numbers, and
aligns timing behavior across the driver and chat scripts.
No functional changes intended aside from consistent timeout handling.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Introduce optional Assisted GNSS (A-GNSS) support for HL78xx GNSS using
AT+GNSSAD commands (MODEM_HL78XX_12 only).
Add Kconfig to enable the feature, extend the GNSS driver state to keep
A-GNSS validity/expiry, and add chat parsing for +GNSSAD responses.
New public APIs allow applications to:
- query assistance status (AT+GNSSAD?)
- request assistance download for supported day values
(AT+GNSSAD=1,<days>)
- delete stored assistance data (AT+GNSSAD=0)
The feature is guarded by CONFIG_HL78XX_GNSS_SUPPORT_ASSISTED_MODE and
adds no behavior changes when disabled.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add comprehensive GNSS functionality to the HL78xx modem driver,
enabling GPS/GLONASS positioning for Sierra Wireless HL78xx modules.
Key features:
- GNSS data acquisition via NMEA0183 and proprietary GNSSLOC
- Automatic RF path management (GNSS requires airplane mode)
- State machine integration for LTE ↔ GNSS mode switching
- Configurable NMEA sentence output and satellite tracking
- Search timeout and configuration safety checks
- Event-based position updates and satellite info
Architecture:
The implementation uses explicit mode switching APIs
(hl78xx_enter_gnss_mode/hl78xx_exit_gnss_mode) to manage the
shared RF path between LTE and GNSS. The HL78xx hardware shares
RF components between the LTE and GNSS radios, preventing
simultaneous operation.
Currently, GNSS mode requires entering airplane mode (CFUN=4) to
disable the LTE radio. This approach is necessary because the
driver does not yet implement PSM (Power Saving Mode) or
Idle-eDRX, which would allow GNSS operation during LTE idle
periods. Future enhancements can leverage these power-saving modes
to enable GNSS searches without fully disabling LTE connectivity.
A pending request mechanism handles early GNSS mode requests that
arrive before modem initialization completes, ensuring reliable
startup behavior in both fully-functional and airplane boot modes.
The driver integrates with Zephyr's GNSS subsystem and provides
HL78xx-specific extensions through a dedicated API header.
New files:
- drivers/modem/hl78xx/hl78xx_gnss.c/h: Core GNSS driver
- drivers/modem/hl78xx/hl78xx_gnss_parsers.c/h: NMEA/GNSSLOC parsing
- include/zephyr/drivers/modem/hl78xx_apis.h: Extended public APIs
Tested on HL7802/HL7812 modules with various GNSS scenarios.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Make DNS reconfigure path report errors and allow retries instead of
silently continuing after failures.
- Change dns_work_cb() to return int and propagate error conditions
- Reschedule DNS work on -EAGAIN in carrier-on timeout handler
- Log DNS update failures from +CGCONTRDP parsing
Improve socket receive robustness and concurrency.
- Move RX ring buffer from global to per-device instance storage
- Replace parser state booleans with atomic bit flags
- Reset parser flags at init and after completed transfers
- Add clearer error logs and propagate specific receive failures
- Use compact initializer style for crafted net_msghdr
- Raise parent mismatch log from warning to error
No functional behavior change expected on success paths, but failures
now surface and recovery can be retried.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Remove CONFIG_PM_DEVICE guards around the HL78xx PM handler so it is
always compiled. Register the driver PM action with
pm_device_driver_init() during init and return its result. Drop the
manual resume path and pm_device_init_suspended() branch.
This aligns the driver with the Zephyr PM framework and lets the PM core
manage suspend/resume consistently.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Introduce CONFIG_MODEM_HL78XX_COMMAND_BUFFER_SIZE to control the AT
command buffer size. Add cmd_buffer and cmd_len to modem_buffers and
dynamic_script/dynamic_chat to hl78xx_data to support dynamic scripts.
Add modem_dynamic_cmd_send_async() to send commands asynchronously with
response matching and a user callback. This complements the existing
synchronous path and improves flexibility for non-blocking operations.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The MODEM_CHAT_SCRIPT_DEFINE timeout parameter was mistakenly treated as
milliseconds, but the API expects the value in seconds. Update the
timeout from CONFIG_MODEM_AT_SHELL_RESPONSE_TIMEOUT_MS to a fixed value
of 5 to reflect the correct unit.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add the `DEVICE_API` wrapper to the remaining `spi_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The MSPM0 clock control code sets clk0 as the MCLK source without
checking if clk0 is enabled. This seems to cause the CPU to not run.
The changes in this commit will set clk0 as the MCLK source only if the
clk0 is enabled. The clk0 is considered enabled if a user defines the
the clk0-div property for the syspll node in the devicetree.
The mspm0g.dtsi defines the clk2x-div property for the syspll node in
the devicetree. The clock control code as is only allows either the
clk2x-div or the clk0-div property to be set but not both. This
essentially means the syspllclk2x was enabled, but clk0 was set as the
MCLK source.
The fix would also allow users to continue using the syspll node as it
is defined in the mspm0g.dtsi without having to override the node for each
board.
Signed-off-by: Lay Desai <lay.desai@he360.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 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>