sockaddr_un.sun_path is limited to 108 in Linux
(and to similarly small numbers in other systems).
Let's check that it fits before copying it, and error out otherwise
(the user won't be able to connect to that socket if the path
is truncated, and if we overflow we will just corrupt memory).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add configuration for nrf9160dk/nrf9160/ns and
nrf5340dk/nrf5340/cpuapp/ns targets.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Some STM32 SPI have the ability to bypass the baudrate prescaler, which is
equivalent to having a prescaler of 1.
Adds this new value in the prescaler calculation if available.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The CHSC5X chip requires reads to be aligned to multiples of 4 bytes.
If the read length is not a multiple of 4, the device pulls SDA/SCL low
for about 140 ms. The IC_TYPE address is corrected to 0x80.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
Improve GPPI documenation and fixes for bsim support in PPI
implementation of GPPI helper.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Providing a guide on how to setup an Ubuntu24.04 x86_64 host
for arm builds and how to build and run locally the arm binary.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Support cross-compiling from one Linux host for another Linux target.
This is done by allowing users to set NATIVE_TARGET_HOST for cmake
which will override the automatic detection.
At the same time, add support for building for 32bit arm targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This check is meant to be easier on users so they do not need to bother
setting ZEPHYR_TOOLCHAIN_VARIANT to "host" when building for
native_simulator based targets, so we default in that case to it.
But when somebody has actively set it to "cross-compile" we should not
override it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Merge the GEN_ABSOLUTE* macros for architectures which have
the same assembler.
Add support for building the POSIX architecture for armhf targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
drivers/crypto/crypto_mbedtls_shim.c:310:3: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
uint16_t tag_len = ctx->mode_params.ccm_info.tag_len;
^
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The lfclk was left enabled by mistake, it has status disabled
followed by status okay a few lines down. Remove the spurious
status = "okay";
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The global variable ipi_lock is both local to the file ipi.c and
only used when CONFIG_SCHED_IPI_SUPPORTED is enabled. As such its
definition should be wrapped with an ifdef.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Explcitly zero the flags of the SQE obtained from `rtio_sqe_acquire`
when the `rtio_sqe_prep_*` helpers aren't used (the helpers memset the
entire struct to 0).
The flags must be reset to ensure the `RTIO_SQE_TRANSACTION` and
`RTIO_SQE_CHAINED` are not retained from a previous SQE.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Introduce steps to maintain cache coherence around DMA accesses to the
underlying SD / eMMC storage.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Remove the manual encoding of edata->header.channels and
edata->header.timestamp as these are now handled during rm3100_encode()
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Use rm3100_encode() to populate cycle_count info when
configured in streaming mode.
Previously when configured for streaming, cycle_count would
be 0 and rm3100_convert_raw_to_q31 would default to always
use the 600hz divider resulting in values off by a factor of 2.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
The scale factor when used as a divider from the datasheet specifies
units in LSB/uT not uT/LSB. This change corrects the comment to reflect
the correct units for the divider.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
msx-gpios is now replaced with m0/m1-gpios for adi,tmc2209 in order
to be consistent with other step/dir drivers
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
unify msx-gpios for step-dir drivers. tmc2209 is an exception
for now and hence migrating to m0/m1-gpios instead of msx-gpios.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Add a Kconfig option to tweak the i2c shell command buffer size,
similarly to other shell commands.
This is allocated on the stack so add a note about it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
When MOPL exceeds MTU, adjust it to match MTU instead of failing the
connection. This handles the common case where mainstream mobile
operating systems (iPhone and Android) negotiate
MOPL values greater than the RFCOMM or L2CAP MTU.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
FRDM/RD RW612 overlays are updated to provide explicit AHB RX buffer
configuration for the FlexSPI controller, aligning with RW61x features:
- FlexSPI flash (port A): 32 KiB cache, dynamic decryption, XIP, DMA
- FlexSPI pSRAM (port B): 32 KiB cache, dynamic decryption, XIP, DMA
The rx-buffer-config now assigns a dedicated buffer for the primary
CPU traffic and leaves buffer 7 as the generic fallback, matching the
expected cache/DMA behavior and MCUX SDK defaults. This ensures sane
defaults when PSRAM is enabled without requiring users to patch AHB
buffer settings manually.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Originally, function 'mcux_lptmr_get_pending_int' checks if both
TCF and TIE flags are set to determine if an interrupt is pending.
But function 'LPTMR_GetStatusFlags' only returns the status flags,
that is we will never get TIE flag from it. then the function
always returns false.
The correct approach is to read the CSR register directly and check
if both TIE and TCF bits are 1. If yes, there's a pending interrupt;
if not, there isn't.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Test the implementation of `PDM_DT_IO_CFG_GET`. Implemented as a
distinct test from `dmic_api` to allow running natively in CI.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a macro to construct a `struct pdm_io_cfg` instance from the
devicetree node with the appropriate properties.
Add macros to query which PDM channels are available.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The allowable ranges for the clock frequency and duty cycle, together
with the enabled channels, are hardware configuration parameters that
should be described in devicetree.
`pdm-dmic.yaml` is its own file to allow more complicated hardware
configurations to inherit it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When CMUX channels are closed, UART goes back to AT command mode.
Switch Chat pipe to use the plain UART as DLCI2 pipe does not
exist anymore.
Add a small delay, so the remote end have time to clean up and
go back to normal AT command mode.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Configure the alignment of the data buffers based on the
dma_buf_addr_alignment property. Default to 32 if property isn't set.
Signed-off-by: Alex Apostolu <aapostolu@tenstorrent.com>
In the `airoc_mgmt_connect` function, if the user provides a security
type of `WIFI_SECURITY_TYPE_NONE` along with a PSK, the driver attempts
to scan for the AP to determine the correct security protocol.
However, if this scan fails or does not find the AP, the driver would
previously fail the connection attempt instead of using the security
type originally provided by the user.
This change ensures that if the scan does not resolve the security
type (`WHD_SECURITY_UNKNOWN`), the driver falls back to using the
security type from the connection parameters. This makes the connection
process more robust and resilient to scan failures.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Since caching is enabled before z_data_copy(), RAM
functions may still be cached in the d-cache instead
of being written to SRAM. In this case, the i-cache
will fetch the wrong content from SRAM. Thus, using
"fence.i" to fix it.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
Remove the default configuration FLASH_LOAD_SIZE, because
"linker.ld" will automatically configure FLASH_LOAD_SIZE
to the same default value
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
The -Wno-stringop-overflow flag is specific to GCC and causes issues
with other compilers like Clang. Separate the compiler options so that
the warning suppression flag is only applied when using GCC.
This change wraps the -Wno-stringop-overflow flag in a compiler ID
check while keeping the optimization flags (-O3 -std=c11 -ffast-math)
applied for all compilers.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Add RTC node in sam_e54_xpro.dts
Update sam_e54_xpro.yaml to reflect RTC G1 support on the board.
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
Removing references to infineon,cat1-uart-pdl from device tree board
files. The differentiation between PDL and UART based drivers is done
by a Kconfig option. See discussion in this PR for context:
https://github.com/zephyrproject-rtos/zephyr/pull/98035
Signed-off-by: John Batch <john.batch@infineon.com>