add timestamping on Tx to packets marked for timestamping
add timestamping on Rx to all packets for later use
fix race condidition on adding timestamp when sending delay_req
Signed-off-by: Adib Taraben <theadib@gmail.com>
The function FLEXIO_SPI_MasterTransferNonBlocking has a bug when
works in CS continuous mode. In this mode, both RX and TX
interrupts are enabled, they share the same IRQ line.
In the ISR, the RX event and TX event are not handled well,
so a short delay in ISR is needed.
The function FLEXIO_SPI_MasterTransferNonBlocking issue is fixed,
the delay in ISR can be removed.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
- Add support for default Annex-55 Bluetooth calibration data load
for both IW612 and IW416 SoC.
- Add support for default Annex-100 Bluetooth calibration data load
for both IW612 and IW416 SoC.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
The result of gpio_add_callback() was not checked, which may
lead to silent failure in alert interrupt setup.
CID: 525074
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
This command waits for a given time (in seconds) and will continuously
poll from the UART device and print on the Shell console. This command
can be used to also test the RX line.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
The returned values from function calls should
be ignored since these function calls are dummy reads.
fixes#90480
Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
clock control is required for "fast instances" so assert clock
is enabled alongside PM DEVICE RUNTIME. Update UART tests to
reflect this requirenment.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The UART_NRFX_UARTE_USE_CLOCK_CONTROL is no longer used and
incorrectly selects CLOCK_CONTROL if UARTE120 exists. Remove
it.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Currently the config CLOCK_CONTROL_NRF2 is used as a GLOB
style config which includes all "NRF2" drivers and related
configs.
With NRF2, clocks are treated as individidual devices
with individual device drivers. This commit split the
CLOCK_CONTROL_NRF2 config into device specific configs
and ifdefs. With this, drivers are selected individually
based on devicetree state as is common for most devices
drivers, and dependencies like NRFS and specific NRFS
services are selected by the specific driver which nees it.
Checks for CLOCK_CONTROL_NRF2 are updated to check for
existance of the clocks instead.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Currently there is a mismatch between the naming of the hardware and
the drivers targetting the hardware. nrf2_ is used instead of
the actual bindings names, like nrf2_audiopll instead of
nrfs_audiopll. This makes it hard to map drivers to the hardware
they are targetting.
There is historical reason for some of this, namely the same binding
name was used for different hardware, which is why nrf2_ was used
on newer platforms. This is no longer the case though, so drivers
and configs can be named according to the hardware without conflict.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The Packet Trace Interface is a debug interface that emits TX and RX packet
data over a serial connection in real time.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add a new driver class for drivers related to debugging, such as
trace hardware, performance counters etc.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add support for the Renesas RA Event Link Controller, including
driver sources, Kconfig, and Devicetree bindings.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
make sure the hal is stopped, before
configuring the link. The phy can change the
speed without notifying a link down in between.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
When using target mode, we've found that some times the msg field can
be null through some of the code paths of the interrupt event handler.
Signed-off-by: Yuval Peress <peress@google.com>
Avoid k_sleep() never being called when video_write_reg_retry() and
video_read_reg_retry() have a number of retry set to zero (default).
The default number of retries being controlled by
CONFIG_VIDEO_I2C_RETRY_NUM.
Signed-off-by: Josuah Demangeon <me@josuah.net>
The async_user_callback could be triggered from
both the DMA transfer complete interrupt and
a k_work queue timeout. Since the timeout runs
outside of an ISR context, it could be interrupted
by the DMA ISR. This might leads to a race condition
where both paths access and modify shared
DMA buffer state (offset and length) simultaneously,
causing data corruption or out-of-sequence processing.
Introduces proper synchronization to prevent concurrent
access to shared DMA buffer variables,
ensuring consistent and reliable data handling.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Updated driver based on changes done in SDK 25.06.00-pvw2.
Update hal_nxp to include BLE LL and IEEE 802.15.4 PHY NBU
combo firmware for MCXW72 boards.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Updated mcxw_get_time function to output its result in nanosecond
resolution and updated code accordingly.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Call entropy APIs to use TRNG peripheral on STM32WB0x devices for BLE
purposes.
Enable RNG node on Nucleo-WB0x boards.
Remove RNG initialization as it's done in the entropy driver.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
On Cortex-M33 the access to peripheral registers doesn't act as a data
synchronization barrier for memory accesses to normal memory. So before
triggering any TASKS for cache operations we need to make sure the core
doesn't have any pending memory transactions.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
When reception is restarted (STARTRX after ENDRX but no STOPRX) it is
possible that FRAMETIMEOUT countdown counter will not be started by
the first received byte if byte was already being transmitted when
STARTRX was called. If that is the only byte then it is expected that
timeout will be triggered but since FRAMETIMEOUT counter is not started
there is no FRAMETIMEOUT event which has short to STOPRX. This
situation will happen in case short buffers are used (< 5 bytes)
because then short ENDRX_STARTRX is not used then.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Converting absolute system ticks to RTC ticks is simple. It needs to be
multiplied by CYC_PER_TICK (which by default is 1). Complex algorithm
was used when driver was not tracking current 64 bit tick and function
was returning uint32_t.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When both NRF_CLOCK_HAS_XO_TUNE and NRF_CLOCK_HAS_PLL evaluate to 0,
one break statement can end up not associated with any case and become
dead code. Refactor a bit the related switch to avoid such situation.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add reference counting in nrf_qspi_nor_xip_enable() so that XIP is
kept enabled as long as there is at least one user that needs it
(boot time enabling done with CONFIG_NORDIC_QSPI_NOR_XIP also counts).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Configure the active discharge feature for both the BUCK and LDO/LDSW
blocks through the appropriate registers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Some macros haven't been properly renamed in previous commits.
Fixes the wrong names that caused compilation errors.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This driver uses the NRF_CLOCK_HAS_HFCLKAUDIO symbol that is defined
in <hal/nrf_clock.h>, so it should explicitly include that header,
not count on this inclusion being done by some other header, like
<zephyr/drivers/clock_control/nrf_clock_control.h>.
Extend also the build assertion that checks if the audio clock can
be used so that now it ensures that the above symbol is defined
(to prevent the driver from silently discarding the audio clock
configured as the clock source).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
If gpio-reserved-ranges to reserve some pins which used by other CPU
Core's OS, we could only handle usable pins owned by current CPU
Core in interrupt handler.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
If the platform uses SCMI pinctrl driver, pinctrl regitster can't accessed
by CPU Core directly, and currently SCMI pinctrl driver has no API to read
back the register value, so use default pad config value for GPIO pad
configuration, and in theory we could use a fixed pad config value in this
driver as each new GPIO configuration has no relation with previous
configuration.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Increased the default number of TX and RX buffer descriptors from 4 to
16. Since the current default buffer size (CONFIG_NET_BUF_DATA_SIZE) is
128, increasing the number of RX buffers is needed to be able to receive
at least one frame of a maximum size split between multiple buffers.
The default number of TX buffers was increased to match the number of RX
buffers and to be able to transmit large frames with many fragments.
Added build-time configuration validation to ensure that the combined
size of all RX buffers is sufficient to receive a maximum-sized Ethernet
frame.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
DMA copies frames which cannot fit into a single buffer into
multiple receive buffers. Updated the receiving code to combine
these buffers into a net_pkt with multiple fragments.
This allows the driver to handle larger Ethernet frames that
span across multiple DMA buffers.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Always reading from descriptor with index 0 could cause processing
of the buffers in a different order than they were received. Fixed by
reading from the next unprocessed position in the ring of descriptors
instead.
Fixed unused variable warnings.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>