When uart_rx_disable is called, or rx gets otherwise disabled,
UART_RX_DISABLED event should be emitted.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Lukasz Fundakowski is a python expert with an interest in
testing frameworks and coding standards. He is a valuable
reviewer with attention to details. He had a major impact on
design and implementation of the pytest plugin for twister.
Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
Microchip MEC1653B has 416KB of SRAM. ARM ICCM SRAM is 356KB
starting at 0xC0000. ARM DCCM SRAM is 64KB starting at 0x118000.
Chip DTS file had incorrect ICCM starting address.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
uart_bcm2711_poll_in() incorrectly returned the received byte
instead of writing it to the provided buffer.
Update the implementation to store the character in *c and
return 0 on success, matching the UART poll_in API.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
In pm_system_suspend there is a possible invalid type promotion
in sys_clock_set_timeout(MAX(0, ticks - exit_latency_ticks), true);
ticks is int32_t and exit_latency_ticks is uint32_t consequently
ticks is promoted to uint32_t resulting in a possible underflow and
setting a wrong value in sys_clock_set_timeout().
Fixes#100005
Coverity CID: 535628
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Fixes an issue whereby a variant of the slot 1 image is built...
which would occupy the same slot that the test is building for,
therefore disable using the new experimental variant image Kconfig
in this configuration
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This is technically a workaround for a limitation in the Pygments DTS
lexer causing the highlighting to break when rendering this example
in the documentation, but this is also an excuse to plug the label that
is used in the official auxdisplay sample.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The plus signs in version strings need to be escaped with double
backslashes when used in regex patterns for the test harness.
This ensures proper pattern matching during test execution.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Instead of reading calibration data (device-unique, but never changing!)
as part of each conversion, perform the read once and cache the value.
This notably avoids frequently an ICACHE disable/enable cycle on STM32H5,
which is a somewhat slow operation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Using a union enables accessing the calibration data using member names
instead of an array index, which makes the code more readable.
As long as the layout of struct { T m1; ... T mN; } and array A[N] is the
same (implementation-specific?), usage of the union type as done should
be Standard-compliant: accessing through either member of the union will
use an lvalue with compatible type to the same underlying object, which
is one of the allowed aliasing situations listed in §6.5.7 of N1548.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Various fields were stored in the instance data despite being initialized
at compile-time to a constant value.
Move these fields to the instance configuration instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The raw "12" constant was used in a place where the "CAL_RES" define should
have been used instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Provide some information on how to find the command that is used for
generating the UICR hex file so that its easier for users to
know what command to use.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
In NVS, allocation table entries (ATEs) are written backwards within
each sector. Under delete-only or delete-heavy workloads, a sector may
contain only delete ATEs, causing the ATE write pointer to approach the
sector boundary.
Without an explicit boundary check, ATE writes may occur at offset 0 of
the current sector, allowing the write pointer to underflow into the
previous sector and corrupt unrelated data or metadata.
Fix this by disallowing ATE writes when the write pointer is at the
sector boundary. This ensures that ATE writes remain confined to the
current sector and prevents pointer underflow across sectors.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Introduce Kconfig option to enfore LLL prepare at margin
irrespective of whether there is an overlapping state/role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use PPI/DPPI to start s/w switch timer to reduce current
consumption.
Explicitly starting the s/w switch timer at prepare meant
current being consumed in the prepare margin duration. Use
of PPI/DPPI ensure s/w switch timer is start when event
timer is started after the prepare margin.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the missing use of remainder value in the sync_offset_us
calculations. Also, Periodic Sync reception is relative to
Peripheral event hence ticks_anchor does not require the
ticker margin and event jitter to be subtracted.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When no trigger was chosen case statement fell through to
default which causes the return code to -ENOTSUPP
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Local variables are initialized but always overwritten before being
read or return.
Drop the redundant initialization.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
litex_clk_dts_clkouts_read() never reports errors and always returns
0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
On STM32N6x SoCs, secrets and persistent information such as Ethernet
MAC addresses are stored in the BSEC OTP fuses. Therefore, default enable
OTP support if NET_L2_ETHERNET and NVMEM are enabled so that the MAC
address can be read from the BSEC OTP fuses through the NVMEM API.
Use the "mac_address0" NVMEM cell to be able to read the ethernet MAC
address from the OTP fuses.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
The STM32N6 has a BSEC peripheral for the OTP management, add it to the
SoC device tree file. Moreover, there are 4 OTP words dedicated for
Ethernet MAC addresses, describe them in the NVMEM layout.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
This new API handles if the MAC address should be fetched from NVMEM,
is static or be randomly generated. Use it so that the driver can
fetch the MAC address from the OTP fuses, when possible.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Introduce the Boot and SECurity(BSEC) control driver. The BSEC
peripheral manages the accesses to an embedded one time
programmable(OTP) array of fuses. Those fuses are used to store
on-chip, non-volatile data like boot and security parameters (e.g:
secret keys, non-volatile counters, etc...).
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
This is the version of the tool that Zephyr infrastructure uses,
and the configuration needs to be adjusted accordingly.
Setting *_ALIASES variables is not necessary anymore.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Add notes about changes in flash_map's Kconfig for what concerns the
crypto libraries used for integrity check.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since now there is a single backend for crypto, i.e. the PSA Crypto API
one, it's better to rename corresponding test case and related
configuration file so that instead of mentioning "psa" they mention
"integrity-check".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Following the removal of legacy Mbed TLS crypto for SHA-256 in the
subsys, this commit updates the related sample. "overlay-mbedtls.conf" is
removed as no more necessary and the corresponding test case is removed
from "testcase.yaml". "overlay-psa.conf" is updated removing unnecessary
Kconfig selections.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove Kconfig and code related to legacy Mbed TLS crypto for SHA-256.
This was used for the integrity check functionality as alternative to
PSA Crypto API. This support was already deprecated and now it's removed
in order to prepare for the next Mbed TLS 4.0 release where legacy crypto
won't be available anymore.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove the NPU power domain enabling inside ethos_u code due to it
has already been done by soc_reset_hooks()
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Remove power domain on for GLCDC controller inside driver code
due to it has already been done by soc_reset_hooks()
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Remove the root clock control early initialization because it has
already been done in the soc_reset_hooks()
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
This commit updates the source files for Renesas RA initialization:
- The SoC reset/init now uses generic hooks from the
"soc/renesas/ra/common" instead of SoC-specific initialization hooks.
- Add soc_reset_hooks() to perform the early reset code.
- Battery-backup domain initialization has been removed from
soc_early_init() and reallocated to soc_reset_hooks().
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
The DSA tag protocol driver should be native for packet
tagging and untagging. There is possibility other vendors/IPs
use it. So, just defined DSA tag structures in header file
instead of using hal header file.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Renamed DSA_NXP_NETC_GCL_LEN to DSA_NXP_IMX_NETC_GCL_LEN for
naming consistency, and wrapped it in DSA_DRIVERS condition.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Moved dsa_tag.h to include folder as common header file.
And we will support iterable section for vendor dsa tag
protocol drivers registering.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>