Because of limitation of gpdma, DMA Rx won't run if user doesn't specify
destination buffer.
Thus, the DMA Rx may stop before the end of the full transaction. So, wait
on DMA Tx instead.
Then, the SPI data won't be consumed by the DMA. We need to properly reset
the fifo before to start a new transaction (it is better to ensure we start
with a clean state before every transaction).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
GPDMA does not support DMA_ADDR_ADJ_NO_CHANGE with a memory buffer. This
feature is required for the SPI driver. Hopefully, SPI driver is the only
user of this feature.
Therefore, this commit introduces a hack for SPI. When the user request an
Rx transaction, rather than copying content of mosi_overrun parameter, it
configures the DMA to fill the destination memory (with either 0s or 1s).
Obviously, this only works if mosi_overrun is 0x00 or 0xFF. Hopefully, none
will need any other value.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Since the single-linked list management is well localized, the variable
names can now be abbreviated a bit.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The management of the single-linked list was made in various places:
- RSI_GPDMA_BuildDescriptors()
- after sys_mem_blocks_alloc()
- at the end of the loop
Centralize it at the end of the loop.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Radio interrupts were only initialized if CONFIG_ARM_SECURE_FIRMWARE=y,
but should be initialized independently of security configuration.
Move initialization from soc_prep_hook() to soc_early_init_hook(),
there is no reason to configure interrupts earlier.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Remove redundant enabling of NRF_RTC_TIMER in SoC specific files
and replace it with default y in the NRF_RTC_TIMER definition.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Clarify that the AMD Xilinx PS Triple Timer Counter (TTC) is used in both
Zynq UltraScale+ MPSoC (ZynqMP) and Versal platforms. Update the device
tree binding description and Kconfig accordingly.
Also, rephrase the Kconfig help text to fix grammar issues and improve
clarity.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
For RISCV vector table needs to be aligned depending on
CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN. This was missing
when using LTO making issues when direct ISR were in use.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Documentation extensions are often edited so bite the bullet and apply
`ruff format` on them and stop excluding them in ruff-excludes
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add test compilation for the STM32MP13 platform as part of
drivers.video.stm32_dcmipp.build since this allow to test
build the driver when STM32_DCMIPP_HAS_PIXEL_PIPES is not
defined.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Correct compilation error due to usage of DCMIPP_PIPE1 / DCMIPP_PIPE2
on platform which do not have pixel pipes by putting those caps
under #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES)
Put also DCMIPP_VIDEO_FORMAT_CAP macro inside since this is only used
for AUX / MAIN pipes.
Fixes: 126aaf6b72 ("video: dcmipp: expose dcmipp caps for all 3 pipes.")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Chosen property "zephyr,usb-device" can be used with the deprecated
legacy USB device stack, but actually was never used in the tree. There
are no plans to use it in the future. Remove it from the documentation,
as there seems to be some misunderstanding and the property appears in
the board's DTS without any use or benefit.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
In 200b886d3c a deprecated kconfig
option was brought back into the driver.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The rts5912's port 80 has a FIFO. In the ISR (Interrupt Service Routine),
extract the FIFO data until the FIFO is empty, otherwise port 80 data will
be lost.
Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
Add bounds check to prevent accessing heaps array with index=-1
when the address parameter is NULL or too small.
Return NULL in such cases to match the API specification.
Signed-off-by: Nulliu Z <zophaisina@outlook.com>
k_current_get is not valid pre-kernel. It will return an invalid dummy
thread or invalid memory. The invalid memory case can occur when
CURRENT_THREAD_USE_TLS is enabled.
Assert in k_current_get when called pre-kernel so offending code may be
identified.
k_is_pre_kernel is moved up in kernel.h to avoid needing a prototype for
k_is_pre_kernel.
Signed-off-by: Rob Barnes <robbarnes@google.com>
Make k_is_pre_kernel safe to call from user mode. Since
z_sys_post_kernel memory is not accessible to user threads, calling
k_is_pre_kernel would result in a memory access fault.
This change adds k_is_user_context guard. It can be assumed the system
is post-kernel if k_is_user_context is true.
Signed-off-by: Rob Barnes <robbarnes@google.com>
When building Zephyr with CONFIG_CPP_EXCEPTIONS=n and linking against a
libc++ built with support for exceptions, lld complains that the
eh_frame-related symbols are missing:
ld.lld: error: undefined symbol: __eh_frame_start
ld.lld: error: undefined symbol: __eh_frame_end
ld.lld: error: undefined symbol: __eh_frame_hdr_start
ld.lld: error: undefined symbol: __eh_frame_hdr_end
libunwind handles the zero size:
76e71e05d2/libunwind/src/AddressSpace.hpp (L520-L526)76e71e05d2/libunwind/src/EHHeaderParser.hpp (L61-L64)
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Correct the documentation of sys_test_bit() and its derivative helper
functions (listed below) since these return a bit mask value instead of
an essentially boolean value as previosuly described.
In tree implementation do conform with that: the result of these
functions are always implicitly tested against being 0 or a non-zero
value.
Helper functions which documentation is modified are sys_test_bit(),
sys_test_and_set_bit(), sys_test_and_clear_bit(), sys_bitfield_test_bit(),
sys_bitfield_test_and_set_bit() and sys_bitfield_test_and_clear_bit().
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The MPSC test consumer was incorrectly handling node returns to
producer free queues. It called spsc_acquire() without checking the
return value, then unconditionally called spsc_produce(). When the
SPSC free queue was full, spsc_acquire() would return NULL and not
increment the acquire counter, causing spsc_produce() to silently do
nothing (it only produces if acquire > 0). This resulted in lost nodes.
At least on QEMU, a 4-CPU configuration is needed for this bug to manifest.
Producers put all nodes in flight simultaneously with the single consumer
unable to keep up, causing frequent SPSC queue full conditions.
The Fix: Loop on spsc_acquire() until it succeeds before calling
spsc_produce(). This ensures nodes are always successfully returned to
producer queues.
Added board overlay for qemu_cortex_a53/smp to enable 4-CPU testing,
which reproduces the issue and validates the fix.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Previously, the bypass() function was called while the shell mutex
was still held, preventing the use of shell APIs (e.g. shell_print())
inside the bypass context.
This change unlocks the shell mutex before invoking bypass() and
locks it again afterwards, restoring proper shell context handling
and preventing potential deadlocks.
Issue fixed by: roni1234321
Fixes#97722
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
Add AES test cases for ECB, CBC, CCM, and GCM modes with standard
test vectors from FIPS-197 and NIST specifications.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Refactor hash tests to support SHA-224, SHA-256, SHA-384, and SHA-512
algorithms with a unified test vector framework.
This improves test coverage and makes it easier to verify hardware
crypto drivers that support multiple SHA variants.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This PR fixes incorrect error message when dts-linter is not installed
and provide a proper message instead of:
`Failed to parse dts-linter JSON output: ...`
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
There is a corner case found that the ACL connected event may be
printed when script is sending shell command by calling function
`shell.exec_command()`. The echo of shell command will mix with the
ACL connected event message. The received message cannot be
recognized by the function `shell.exec_command()`. It caused the
timeout exception reported by the function `shell.exec_command()`.
Before sending any shell commands, check the DUT connected event
after the connection is established on script side.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The previous implementation had a logical error where the prescaler
could never be bypassed due to incorrect use of BIT() macro:
This patch fixes the issue by:
1. Remove BIT() wrapper from LPTMR_PRESCALER macro to use raw
devicetree property value
2. Update bypass logic to check for zero value explicitly
3. Map DTS values to hardware register values correctly:
- prescale_glitch_filter = 0 -> bypass prescaler
- prescale_glitch_filter = n -> divide by 2^n,
using register value (n-1)
The devicetree semantic is now:
- prescale_glitch_filter = <0>: No prescaling (bypass)
- prescale_glitch_filter = <1>: Divide by 2
- prescale_glitch_filter = <2>: Divide by 4
- prescale_glitch_filter = <3>: Divide by 8
- And so on...
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
i2c_map_dt_bitrate uses LOG_ERR, however, one must define (or declare) a
log module where to sink the logs. Since this sits on a header file,
it creates a hidden include order dependency: you must include
i2c-priv.h after registering or declaring a log module on your driver.
Even worse, you are force to use logging in your drivers even if you do
not want to!
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Fixes an oversight of only checking files that are exactly named
CMakeLists.txt - this includes the directory name, so that it
actually checks any file in the tree with this name
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Recent addition of UVC Video encoder added sample targets to the sample
without the proper filter to ensure twister didn't try to automatically
build the sample target.
Not all boards have the zephyr_h264enc and zephyr_h264enc in their
device tree.
Fixes#98275
Signed-off-by: David Leach <david.leach@nxp.com>
Pass verbose flag to Twister to get better insights into what boards are
being built and see progress.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The minimal libc does not include `fnmatch.h` in its default search path.
This causes an issue when running coverage in CI as shown here.
https://github.com/zephyrproject-rtos/zephyr/actions/runs/18839500380/\
job/53748166725
That would technically be fixed with #97855 as well.
Testing Done:
```
west twister -c -p qemu_x86/atom -s kernel.pending.minimallibc --coverage\
--coverage-tool gcovr
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This wrongly displayed in CI as a sample failing, when it is a
test and not a sample, this changes the name to have test in it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>