Added offset to the model relation register for vendor
models to find correct model index
for Composition Data Page 1. The previous implementation used the
'mod_idx' from the 'bt_mesh_model' struct, which led to issues in the
model relation register due to SIG and vender models having the same
model index.
Modified existing functions related to the model relation
register to take in the offset.
Modified macros for determining if a model is a base- or
extending model.
Added check in 'add_items_to_page' to check whether the model relation
is an extension.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Changed buffer length check in bt_mesh_comp_p1_elem_pull.
The previous threshold would result in the
method not detecting the final element when it consisted of just one
model.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Picolibc dependencies limit ability to use third party minimal
implementations of CPP when enablng PICOLIBC_USE_MODULE.
Signed-off-by: Al Semjonovs <asemjonovs@google.com>
This fixes regression introduced in
https://github.com/zephyrproject-rtos/zephyr/pull/63556
In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.
To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Fix a build warning on 64 bit architectures:
zephyr/drivers/sensor/default_rtio_sensor.c:238:17: error: format '%zu'
expects argument of type 'size_t', but argument 2 has type 'uint32_t'
{aka 'unsigned int'}
num_channels type changed to uint32_t in 96175fcc47.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change the integer arithmetic to divide first before multiply.
The muliplication of sys_clock_hw_cycles_per_sec() by ten leads
to a really big number on boards with high-speed clocking, thus
to the overflow warning, and to errors for integration tests.
Fixes: #63678
Signed-off-by: Stephan Linz <linz@li-pro.net>
Two references to the integration of object cores with threads were
missing from the documentation. This fixes that.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Do not propagate unused parameter. ISR callback is already handling
the given flags, there is not need to propagate it through internal
calls.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
get_entropy_isr() has to return the number of bytes copied or
a negative value in case of error.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Return -ENODATA in neorv32_trng_get_entropy_isr when
there is no data available. This is consistent with other
drivers.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
get_entropy_isr() has to return the number of bytes copied or a negative
value for error. Since this driver is assuming that it will always
(????) get the number of requested bytes, change the function to return it
instead of 0.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixing kernel crash caused by memory release
while having a scheduled work item pending.
Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
This polishes the doxygen doc on I3C API to make it,
hopefully, more usable. Fixed some typos too.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The wording on deprecating arch_kernel_init() in favor of prep_c()
has never been materialized. Various architectures are using it to
perform initialization. So remove the wording.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When compiling conn.c using arm-none-eabi-gcc version 11.3.1 20220712
with the -Wmaybe-uninitialized flag a warning is emitted due to
pending_no_cb not being initialized. I'm not sure if initializing it to
NULL is the "correct" fix, but it's certainly not any worse then it being
uninitialized, and it fixes the warning.
Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
This commit fixes the following issues with the PCM data format output
by the MCUX SAI driver:
- WS signal should be only one clock cycle in length for short PCM
format
- Word count should not be fixed to 2, except for classic I2S format
- BCLK polarity should be on falling edge for PCM long and short format
Additionally, the I2S_FMT_CLK_ constants now flip the frame and bit
clock polarity from the normal value expected for the selected I2S
format, as expected by the API.
Fixes#63041
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Update documentation for core clock frequency on LPC55xxx boards, to
indicate that they are clocked from PLL1 at 150MHz by default. Add a
note about the reduction to 96MHz required when using the flash
controller.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Do not clock the LPC55xxx cores from PLL1 when CONFIG_FLASH is set. This
is required due to the following limitation of the flash controller
(documented in the reference manual):
Flash operations (erase, blank check, program) and reading a single word
can only be performed for CPU frequencies of up to 100 MHz. These
operations cannot be performed for frequencies above 100 MHz.
The PLL1 clock source will result in a core clock of 150MHz, which
violates this requirement.
Fixes#62963
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This sets the stack size appropriate for SPARC. Tested on the board
configurations qemu_leon3 and gr716a_mini.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
Specify only the bus corresponding to the current yaml file, as done in
the adi,adxl372-spi.yaml.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
When upgrading to version 3.4, our hardware lost ethernet connectivity.
Our hardware assumes a fixed link and does not communicate with the
underlying phy via the mdio bus.
I confirmed that the atsame54_xpro board also will lose ethernet
functionality when the atsame54_xpro configures the phy via to use a
fixed link...
The eth_sam_gmac driver changed the initialization behavior to call
net_if_carrier_off and notes to wait until phy link is up (via
callback.) However, when in a fixed link configuration, the callback is
never called. So the net_if_carrier_on event never occurs.
This patch adds a check to see if link is up already before calling
net_if_carrior_off. This check works because in fixed-link mode, link-up
is set synchronously during phy driver initialization.
I tested that atsame54_xpro with fixed-link configuration will now work
after this patch.
Signed-off-by: Thomas Chiantia <thomas.chiantia@gmail.com>
The commands showing west build had -b None which isn't quite right. Add
a :board: property with the tdk_robokit1 as its what I tested on myself.
Also noted that llext isn't supported on every architecture but
intentionally left this a bit vague as updating this little comment
every time something is added seems like a recipe for doc rot.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
When the timer frequency is known at compile time, make sure we can use any
time conversion macro as a global initializer.
Signed-off-by: Keith Packard <keithp@keithp.com>
To be used in a global initializer, this must be a macro instead of a
static inline when the return value is constant.
Signed-off-by: Keith Packard <keithp@keithp.com>
clang emits a warning for this code:
foo.c:1:25: warning: division by zero is undefined [-Wdivision-by-zero]
int i = (10 > 100 ? (20 / (10 / 100)) : (20 * (100 / 10)));
^ ~~~~~~~~~~
The warning is generated for code whose value does not affect the
expression result, but technically it is still 'undefined behavior'.
Work around this warning by checking for a zero divisor and substituting
one to make the compiler happy.
Signed-off-by: Keith Packard <keithp@keithp.com>
Connection states are non-trivial to understand based on their names
only, so add short descriptions in the header file explaining what they
do.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Remove excessive debug logging from the SJA1000 driver backend. Logging
each register access makes generic CAN debug logging unusable.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix errenous return value in pacs_gatt_notify function. The function
would always return zero, and not forward the error correctly.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
Add padding to the header and remove unnecessary memset in order to fix
alignment faults in cores such as M0 or ones that support
CONFIG_TRAP_UNALIGNED_ACCESS
Signed-off-by: Yuval Peress <peress@google.com>
CONFIG_HAS_MCUX is also selected by ARM64 and XTENSA-based cores
which don't have any CMSIS files. As such, it's wrong to implicitly
select CONFIG_HAS_CMSIS_CORE when CONFIG_HAS_MCUX is selected. Since
the ARM32-based cores implicitly select CONFIG_HAS_CMSIS_CORE there's
no point in CONFIG_HAS_MCUX also selecting it too.
The old approach caused config-related warnings
in external projects such as SOF after the introduction of
Commit '8d5ed53' ("modules: remove uncessary source for
external cmsis kconfig"). The warnings were in the form of:
"HAS_CMSIS_CORE (defined at modules/cmsis/Kconfig:7) has
direct dependencies 0 with value n ..."
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Don't reset values set in init callback as it is called only once by
bt_mesh_init call. The reset callback is called on every node reset.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
DFU/SR/FD/BV-59-C tests Distributor self-update. Because the actuall
firmware swapping doesn't happen, we need to just simulate the swapping
by setting new Firmware ID sent by LT. We use slot to take firmware id
as by procedure, Fw Update Server doesn't know about it.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>