No need to have such a low MTU 576 bytes as it prevents sending
larger packets for loopback interface. If one have low MTU setting
and one tries to send for example larger UDP packets, then one
can get this rather confusing error message
Available payload buffer (548) is not enough for requested DGRAM (1197)
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Rename the NXP LPC family MCAN driver to not use "MCUX" in its name as this
is not a shim driver based on the MCUXpresso HAL.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Implement readout protection for the STM32U5 / STM32L5 series.
Move the stm32u5 / stm32l5 flash register manipulation in
flash_stm32_option_bytes_write() to be called by the
flash_stm32_set_rdp_level().
Signed-off-by: Johannes Schuler <jschuler@testo.de>
Add a helper function to check the lock status of the QSPI-FIU
bus controller mutex. This is useful for debug assertions and
verifying exclusive access in high-level drivers.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
For drivers that were making mentions to master/slave terminology in
their comments or code without no reason to do so (i.e. no API in their
HAL is using such terminology), the terminology was dropped and replaced
with controller/peripheral terminology.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
I2S bus specification 3.0 [1] updated terms "Master" and "Slave" to
"Controller" and "Target". This rename macros using these terms and
deprecates old names.
[1] https://www.nxp.com/docs/en/user-manual/UM11732.pdf
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Have bbram shell commands use the new SHELL_HELP macro
Also fix the syntax for "read" command as it wasn't
correctly indicating that count cannot be specified
without address.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There are many drivers which control a disabled-by-default watchdog timer
but take the liberty of selecting HAS_WDT_DISABLE_AT_BOOT and interpreting
WDT_DISABLE_AT_BOOT=n as "enable the timer", which does not correspond to
the semantics of this option.
Update all such drivers to no longer select HAS_WDT_DISABLE_AT_BOOT and
ignore the WDT_DISABLE_AT_BOOT option.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
WDT_DISABLE_AT_BOOT should only be used to forcefully disable watchdog
timers that are enabled by default after system reset. Update the Kconfig
help text of WDT_DISABLE_AT_BOOT and its dependency HAS_WDT_DISABLE_AT_BOOT
to make this clear.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
IOMEM interface base address is stored in both device configuration
and device data structures. Remove the occurence in the config data
that is used only for trace messages.
No functional changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Use same retry counter for APN script as the dial-script uses.
When dial-script fails, shut down the modem. Don't restart from
beginning.
When might still have CMUX connected, so jumping to IDLE->RESUME
leaves the CMUX connected, while the state machine expect otherwise.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
For some reason, the driver was not requesting the HAL to enable SOF even
if the feature was enabled at UDC stack level.
Fix by requesting HAL to enable SOF based on stack configuration.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When build:
west build -p -b rpi_pico2/rp2350a/m33/w zephyr/samples/net/wifi/shell
Warnings occur (leading to errors in Twister runs):
.../drivers/wifi/infineon/airoc_wifi.c:749:9: warning: enumeration value
'__WIFI_FREQ_BANDWIDTH_AFTER_LAST' not handled in switch [-Wswitch]
.../drivers/wifi/infineon/airoc_wifi.c:749:9: warning: enumeration value
'WIFI_FREQ_BANDWIDTH_UNKNOWN' not handled in switch [-Wswitch]
749 | switch (params->bandwidth) {
| ^~~~~~
Signed-off-by: Stephan Linz <linz@li-pro.net>
Remove a useless return value check in i2s_ambiq_init().
The variable 'ret' was initialized to zero and checked before being
assigned, making the condition always false.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add the SPDX-License-Identifier tag to the file header to properly
declare the Apache-2.0 license, in line with Zephyr licensing
requirements.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The mailbox send callback is always invoked with a valid device
pointer.
Remove the redundant NULL check.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
the ads1119 has its own driver connected to CONFIG_ADC_ADS1119,
so remove it from CONFIG_ADC_ADS1X1X. Also the driver under
CONFIG_ADC_ADS1X1X doesn't support it.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Starting from revision 1.1 nPM1304 has support for soft start on the LDSW
regulators configured in the LDO mode. This requires special handling and
is done automatically for applicable device versions.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
The driver and module now supports nRF70 only, nRF71 support will be
added in the future using a new driver.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The udc_submit_ep_event() does not document this requirement, but the
`net_buf` provided to it must have been removed from the driver's
internal queue before submission. This wasn't noticed because the list
node member of `net_buf` was untouched, but is now causing list corruption
due to 5137439a47 when multiple packets are
enqueued.
Fix by always dequeuing buffers before submitting them to the UDC stack.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
In some cases UARTE peripheral is generating RXTO events together with
ENDRX events. Those events are unexpected and should not be handled.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Prevents building the driver entirely if the PM symbol is selected instead
of erroring out via a compiler pragma.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Rewrites the logic used to select the matching target config during address
match events.
Handles 7-bit and 10-bit modes more clearly, adds fallback to slave2_cfg
if slave_cfg is NULL, and reduces nesting.
Fixes a case where the primary target (slave_cfg) could be unregistered
before an address match interrupt fires, which could lead to a null
pointer dereference.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Rewrites the logic used to select the matching target config during address
match events.
Handles 7-bit and 10-bit modes more clearly, adds fallback to slave2_cfg
if slave_cfg is NULL, and reduces nesting.
Fixes a case where the primary target (slave_cfg) could be unregistered
before an address match interrupt fires, which could lead to a null
pointer dereference.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Set `port_pin_mask` in the GPIO driver for Silicon Labs Series 2
based on Devicetree `ngpios` and `gpio-reserved-ranges`. This
mask is used to validate that the pin numbers passed to the GPIO
API are valid on a given device.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Check the used XSPIx peripheral before calling the corresponding function
instead of hard-coded calling the LL_PWR_EnableXSPIM2() and
LL_SBS_EnableXSPI2SpeedOptim() during flash_stm32_xspi_init(...).
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Add a native Zephyr driver for Semtech SX1261/SX1262 LoRa transceivers that
does not depend on external modules (loramac-node or lora-basics-modem).
The driver is experimental and must be explicitly enabled by selecting
CONFIG_LORA_MODULE_BACKEND_NONE.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add DCP auto status support and update the control stage update
sequence to adapt with hardware auto response mode
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
The e1000 Ethernet driver TX staging buffer is sized to NET_ETH_MTU
(1500 bytes), but the Ethernet L2 layer prepends headers (14 bytes
standard, 18 bytes with VLAN) before calling the driver's send function.
When transmitting MTU-sized packets, net_pkt_get_len() returns the full
L2 frame size (up to 1514+ bytes), causing a 14-18 byte out-of-bounds
write into adjacent RX buffers. This is remotely triggerable by inducing
large TX responses such as ICMP echo replies.
The RX staging buffer has the same issue - it is sized to NET_ETH_MTU
but receives complete L2 frames from the network which include headers.
Fix by sizing both TX and RX buffers to NET_ETH_MAX_FRAME_SIZE and
adding a defensive bounds check to the TX path.
Signed-off-by: Pavel Kohout <pavel.kohout@aisle.com>
Addressed stability and security issues identified by Coverity in
the ATaes132a crypto driver:
- CID 434625: Added range validation for 'count' to prevent tainted
scalar usage and buffer underflow in response processing.
- CID 487700 & 487763: Implemented overflow guards for 'buf_len' to
prevent integer overflow and type truncation when calling
ataes132a_send_command.
- CID 487746: Applied explicit type casting to CRC calculations to
satisfy static analysis regarding integer promotion.
Signed-off-by: Shreya Kulkarni <kulkarnishreya2421@gmail.com>
Add OTP driver for the SiFli SF32LB series eFuse controller.
This driver provides read-only access to the eFuse OTP memory
with the following features:
- Cache mechanism: all eFuse content is loaded into RAM during
initialization for improved read performance
- Support for 4 banks x 32 bytes = 128 bytes total OTP storage
- LDO voltage adjustment before reading as required by hardware
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
The base address was written to an incorrect register, which caused
incorrect data to be read from the I2C target. This has been fixed by
writing to the correct register.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Fix inconsistent macro name from IOMUX_GET_SCTIMER_IN_CLR_ENABLE
to IOMUX_GET_CTIMER_CLR_ENABLE to align with the actual CTimer
functionality and related macro naming convention.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The actual_velocity pointer is dereferenced unconditionally before
the NULL check, making the conditional LOG_DBG() guard ineffective.
Since actual_velocity must be valid to reach this point, the
conditional check is redundant and misleading.
Remove it and log the value unconditionally to reflect the actual
control flow.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Remove a dead error check which check ret but ret wasn't even
assigned before the test.
Remove the useless condition to make the intent explicit and clean
up the code.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Correct a clock initialization ordering issue where IMO, an internal
high speed oscillator, was being setup before ILO. This does not match
the MTB initialization order and would cause the part to fault.
Sets up the default clock configuration on the part to be 48MHz. Adjusts
the default WCO (low speed external crystal source) to be 32768 as the
eval board has this crystal on it. Enables common clock elements
(hf_clk, clock_pump) as needed in the part dts rather than the board.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
According to the manual, device should wait:
AT+QPOWD=1
OK
POWERED DOWN
before shutting down. This should take about 300 ms.
Correct the timing to match BG96 manual, where power_key pulse
is 500ms (on a shut down, it say 650ms).
The start-up time of UART is described as >=4900ms so start_ms
is now set to 5s. It does not require 10s.
We require more than 100ms to reset from CMUX to AT mode UART,
500ms seems to be enough. Manual does not describe this delay.
Shutdown time is described as 2s, but we don't typically use that
as the shutdown script receives the POWERED DOWN message and is now
faster.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When net_if_down() is called, the PPP_DEAD event is handled
in state machine before the modem_ppp_ppp_api_stop()
requests the driver to suspend.
Prevent non-wanted re-dial script by checking the admin
state (UP/DOWN) of the PPP interface, before dealing with
lost connection.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
We converted the QMSPI-LDMA driver to linux style with a local
register header in the driver folder. This is part of the long
term plan to remove the MEC5 HAL and have common drivers for
as many SoC's as possible. QMSPI register definitions are in
the SoC layer to be shared with other drivers (MSPI). The driver
was also updated based on changes in the SPI config structure.
The lastest SPI config structure changes force hardware controlled
chip selects and GPIO controlled chip selects to be mutually exclusive.
NOTE: driver works with the flash driver sample
and passes the common flash driver test.
Signed-off-by: Scott Worley <scott.worley@microchip.com>