The calculation of the object size may be incorrect when the size of
a field is smaller than the struct alignment. When such a struct is
used in an array field, the decoded object contains wrong values.
The alignment influences the object size. For example the following
struct has a calculated object size of 8 bytes, however due to
alignment the real size of the struct is 12 bytes:
struct test_bool {
bool b1; /* offset 0, size 1 */
/* 3-byte padding */
int i1; /* offset 4, size 4 */
bool b2; /* offset 8, size 1 */
/* 3-byte padding */
};
This commit changes the object size calculation and computes the size
with the offset and size of the last field in the struct (rounded up
by the struct alignment).
Fixes: #85121
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
Add gpio driver testcase support for kv260. The overlay will select the
PS gpio bank to be tested.
For running this testcase on kv260 PS gpio bank 3 has been chosen
because it is EMIO and design is required to connect pins together.
Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
Add a babblesim test of the BT Tester doing a GAP smoke test
connecting 2 BT testers using BTP.
The purpose of this is to further increase the test coverage
of the BT Tester in CI, as it is only being built, and runtime
errors are typically not caught.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use generic name for structure in driver instead of specific chip name
for better compatibility.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Some files should be separated from the common folder to
each soc folder for future expansion of the chip.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Previously, when detecting the GC_done ATE the gc_done_marker boolean
variable was not set.
Fix this by setting it to true if the GC_done ATE is found.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Updated UDC speed definition macros for STM32 series
to handle different speed configurations
based on the SoC compatibility.
Added conditional checks for full-speed definitions
using DT_HAS_COMPAT_STATUS_OKAY for st_stm32_usb.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Updated USB_DC speed definition macros for STM32 series
to handle different speed configurations
based on the SoC compatibility.
Added conditional checks for full-speed definitions
using DT_HAS_COMPAT_STATUS_OKAY for st_stm32_usb.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Rewrote places in the bluetooth code that converts objects
larger than one byte by taking the address of an unaligned struct
member and changed it to a function that takes the value directly
and converts it to big endian.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Driver is using local macro to get current CPU ID and it is now
in conflict with generic CPU_ID. Added prefix to avoid conflict.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In case of a single core it resolves to 0. In many cases it reduces
code size and execution time compared to reading id in runtime.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Applied fix for nRF54L anomaly 30, which requires a periodic
calibration of high-frequency clock.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Add a timeout to the SPI boot process to ensure that `bt_enable` does
not block forever but instead returns an error after an appropriately
large delay. While 1 second would be sufficient under normal operation,
we also want to give the controller time to perform any application
upgrades via a bootloader.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The ADC and watchdog samples are not currently supported for the
non secure target of the nRF54L15 DK.
Add exclusions for these until they are supported.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
This adds the nrf54l15dk/nrf54l15/cpuapp/ns board variant to
Zephyr. It allows to build applications for this target.
This is an initial support for the non secure target which allows
building and running tfm_ipc and config_build.
This is NOT full support of the non secure target in upstream
Zephyr.
There are important limitations, such as:
- The hardware Crypto accelerator is not supported and thus the non
secur target is NOT secure for production applicatiions in upstream
Zephyr.
- The BL2 is not supported, so no DFU is supported with this support
Most of the code chagnes here are taken from nRF Connect SDK
in order to avoid having noups there.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Add the Nordic Memory Privilege Controller (MPC)
in the dtsi of nrf54l15/10/05.
This sets the number of override regions and the
granularity of the regions.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
DMA channel capacity wasn't properly initialized and the computation
relies on it being zeroed.
This only works fine only when requesting channel the first time
causing problems when we have multiple cycles of channel
request/release.
Fix this by properly initializing the capacity when requesting the
channel.
Fixes 43a48d4630 ("drivers: dma: sdma: Update buffer descriptor")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes a large partition mounting error
for flashes with erase size > 32KB
(e.g. s26ks512s0 has 256KB erase size).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The ti,opt3001 ambient light sensor is capable of asserting its interrupt
gpio upon conversion completion. The interrupt gpio can then be used to
trigger a reading of the conversion result automatically.
Due to this, it makes sense for the driver to implement the sensor trigger
functionality.
Add a devicetree property, int-gpios, to the ti,opt3001 bindings to allow
describing the gpio used for getting interrupts from the ti,opt3001.
Implement the sensor trigger functionality with options for using the
global worker thread or letting the ti,opt3001 create its own thread for
servicing the interrupts.
In both cases, when an interrupt is received the driver will read a new
measurement from the chip and clear the interrupt. The sample is then ready
to be read by the user of the sensor.
When manually triggering a sample_fetch, the trigger handler is not
invoked.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
Adds initial pinctrl support to arm v2m_beetle board target.
Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds initial pinctrl support to all arm mps3 board targets.
Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Migrates mps2 targets away from the pinmux driver to
the new pinctrl driver.
Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds necessary pinctrl support for Arm cmsdk uart driver
Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds necessary pinctrl support to Arm SBCon I2C driver.
Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>