On STM32H7 targets with cache management enabled by default, blocking
access to flash option/control registers using flash_ex_op() may cause
imprecise Bus Faults when attempting to unlock them immediately afterward.
This is due to instruction pipeline and cache effects, where the CPU might
execute a forbidden access before the lock is fully acknowledged.
Adding barrier_isync_fence_full() ensures that all prior
instructions are completed and the pipeline is flushed,preventing premature
access and avoiding the fault.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Do not enable network compatibility mode flag for network tests
so that we will get better coverage of the wrong network APIs
used.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use the underlaying zsock_ prefixed fcntl macros instead of the
POSIX_API fcntl renames.
After d45cd6716b and this, we do not
anymore use fcntl directly but use the underlaying Zephyr APIs.
So, let's also remove this include.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
According to the compiler, the ret variable might be uninitialized
in the function (looks like a false positive but fix it anyway).
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the sensor_value only has an integer part N, this always resulted in q31
value of <N-1>.999999.
As the calculated shift value already uses 'abs(sample.val1) + 1' it is
safe to assume we can't have 100% scaling of this integer part and we can
omit the -1.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a build-all test for stm32n6_axisram driver that is currentl not
default enabled in any STM32N6xx based boards.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct clock config info recently modified that should use
STM32_DT_INST_CLOCK_INFO_BY_NAME() macro instead of
STM32_CLOCK_INFO_BY_NAME() macro.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The BMCA comparator ptp_btca_ds_cmp() did not follow the IEEE1588
ranking order: priority fields handled only the “greater” case, causing
valid winners to fall through to the clockIdentity tie-breaker and
resulting in incorrect grandmaster selection. This also caused the
state transition from TIME_TRANSMITTER to GRAND_MASTER to be missed.
Fixes: #99562Fixes: #99566
Signed-off-by: Peter Büchler <peter.buechler@gmail.com>
Use a list of ports and FOR_EACH to instantiate GPIO devices instead of
having one line to instantiate each port. This is much shorter and also
makes it easier to add support for new ports, if necessary in the future.
While at it, cover all ports from A to Z since it is now trivial to do so.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce documentation for using dtsh (a Devicetree Shell)
as an external module in Zephyr.
This module installs a West extension.
See also RFC #59863.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Add SCMI generic power state definitions for ON and OFF as specified
by the SCMI Power Domain protocol.
These constants will be used when setting or querying power states.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
It is thus possible to enable CONFIG_UART_USE_RUNTIME_CONFIGURE for
this driver and re-configure a uart device at runtime.
Driver's init function was moved to the bottom of the file for two
reasons: to ease factorization and to follow the common device driver
source structure (usually: the init function is right before the
API structure and the instanciation macros).
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
On destructive or functional reset, the soc_reset_hook will check reset
source and clear SRAM TCM.
Add support to let developer clear specify reset source to retein memory
content.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
MSC BOT can work with just one buffer because buffer to receive CBW is
never queued at the same time as CSW. SCSI buffer needs to be multiple
of bulk endpoint wMaxPacketSize and therefore is suitable for handling
both CBW and CSW. Take advantage of this to reduce memory usage.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Double buffering make it possible to significantly increase the transfer
rates by avoiding idle states. With two SCSI buffers, one buffer can be
used by disk subsystem while the other is being used by UDC (ideally
with DMA).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
When endpoint enqueue fails the device has no reliable means of recovery
other than a reset. Implement 6.6.2 Internal Device Error handling on
failed enqueue.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Configure GPT timers as system tick source when PM is enabled to resolve
low power mode issues:
- Cortex-M SysTick loses state during mix power-off
- SysTick cannot maintain time during system suspend
Configuration changes:
- Disable Cortex-M SysTick when GPT timer is enabled
- Set GPT clock frequency to 32768 Hz for low power operation, 32k is
reserved in soc level system sleep mode
- Configure system tick rate to 1024 Hz
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Enable GPT hardware timers on imx943_evk boards:
- gpt_hw_timer1 for M33 core
- gpt_hw_timer2 for M7_0 core
- gpt_hw_timer3 for M7_1 core
These will be used as system tick sources when PM is enabled.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add GPT timer nodes to support system tick and counter functionality:
- gpt_hw_timer1/2/3: System timers for M33/M7_0/M7_1 cores
- gpt4: General purpose timer/counter
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Fix Device Tree formatting issues to comply with Zephyr coding style
guidelines for i.MX943 EVK board and dts files
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Introduce HID_USAGE_PAGE16() in order to be able to declare vendor
specific usage pages which require 16-bit numbers.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of checking for both CONFIG_ARCH_POSIX && CONFIG_EXTERNAL_LIBC
as it is just simpler since we have this option.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of checking for both CONFIG_ARCH_POSIX && CONFIG_EXTERNAL_LIBC
as it is just simpler since we have this option.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Commit 08fedb4a80 ("drivers: uart: npcx: add asychronous API support")
missed updating the clocks for uart2. This patch fixes it.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Changes the default value of the INPUT_CST816S_INTERRUPT flag to default to
true if the there is a compatible with the irq-gpio property enabled.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Some CID-related functionalities of the DTLS sockets are conditionally
compiled, make sure that code is built with tests/net/all test suite.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Some CID-related symbols were prefixed but not updated in sockets_tls.c
as that configuration was not built by the tests/net/all test suite,
hence easy to miss.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Since we are using sys_getopt now we do not need to pull unistd.h
for anything amore.
Let's remove it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix, and it is
enabled by default.
And since sys_getopt was split from POSIX_C_LIB_EXT this component
only needs to enable GETOPT and no the whole POSIX_C_LIB_EXT.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>