The test instantiate few vnd,i2c devices so it fails with boards with
devices that select I2C, as that causes i2c_test.c to be included with
the build that tries to redefine the same devices as well.
This is a library test anyway, so restricting to native_sim should be
good enough for it anyway.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
use the function utf8_lcpy to ensure that UTF8 encoded strings are
properly copied and NULL terminated.
Fixes#42128
Signed-off-by: Ping Wang <pinw@demant.com>
Previously timer.c was only built with CONFIG_POSIX_CLOCK=y even
though it has had its own Kconfig symbol (CONFIG_TIMER) for a
very long time.
Make POSIX_CLOCK imply TIMER rather than control whether it is
built, and adjust Kconfig / CMake as necessary.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Add information about zperf ratio between mbps and kbps, kbps and bps
changes from 1024 to 1000, to align with iperf.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
The ratio between mbps and kbps, kbps and bps should be 1000, instead of
1024, as common sense.
The wrong ratio will decrease the Zperf throughput result.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Add an active discharge api for regulators. This uses the already
existing but previously unused regulator-active-discharge
property.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The only thing we put in there is the CID and that fits comfortably into
the (at least) 4-byte void pointer `user_data`.
This removes the dependency between `CONFIG_BT_ATT_TX_COUNT` and
`CONFIG_BT_L2CAP_TX_BUF_COUNT` since previously there was still a need
for an L2CAP context for every TX'd buffer.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The arm64_cpu_boot_params will be read on other cores
call sys_cache_data_flush_range flush the data from the cache to RAM.
This ensures that other cores can access the correct data.
Signed-off-by: honglin leng <a909204013@gmail.com>
This implements the following statement from the section 5.3.3:
Each Generic Provisioning PDU shall be sent after a random delay between
20 and 50 milliseconds.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Return error code to let an implementation know if the adv was actually
stopped (was scheduled) or not.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Before this change, the bt_mesh_send_cb.end callback was called when all
references to the adv were removed. If an implementation kept more
references to the adv buffer after calling `bt_mesh_adv_send`, the end
callback would not be called when the advertiser finished advertising
this adv.
With this change, the end callback is always called by the advertiser
when the advertisement is finished regardless of the number of
references. This allows an implementation to keep the adv buffer for the
future use. As an example, pb_adv.c keeps advs for retransmission.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The GPIO power domain driver needs device power management enabled
to compile if `PM_DEVICE_POWER_DOMAIN` is enabled.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Sort the included headers by name, remove unneeded includes and ensure
soc.h is included prior to the Zephyr CAN headers.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Comparisons that have constants on both side of the operator
were getting flagged incorrectly. Adjust the check so that
pure constant comparisons are not flagged, reducing false
positives.
WARNING:CONSTANT_COMPARISON: \
Comparisons should place the constant on the right side of \
the test
+BUILD_ASSERT(CONFIG_MAX_PTHREAD_COUNT == \
CONFIG_MAX_PTHREAD_MUTEX_COUNT - 1);
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This sample takes a POSIX-y spin on the existing
Dining Philosophers sample application. The objects
used in the POSIX version are pthread_mutex_t, and
the threads are pthread_t.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Two functions can be used with relative ease to convert between
Zephyr and POSIX priorities and policies. Namely,
uint32_t zephyr_to_posix_priority(int32_t z_prio, int *policy)
int32_t posix_to_zephyr_priority(uint32_t priority, int policy)
These are not necessarily public API, but they helped with the
POSIX Philosophers Sample, which is in a subsequent commit.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This sample can be used as a "virtual wire", allowing direct access to
devices connected to the target processor - for example: GPS, Cellular,
etc...
This is also useful as a utility - no other connectivity options exist
for UART, where other interfaces like SPI and I2C have shell commands.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Too many times, code is pushed that includes floats that really
becomes doubles and C implicit promotion rules will want to make
floats into doubles very easily. As zephyr primarily targets
low-end process that may not have a double precision floating
point unit, enable this flag globally for now.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The OpenTitan PLIC has support for up to 255 interrupt vectors, so
set it to that. Previously was set to number of IRQs used.
Signed-off-by: Tyler Ng <tkng@rivosinc.com>
`mq_timedsend()` and `mq_timedreceive()` are implemented but
the information is missing in the documentation.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
There is default 15K-ohm pull-down for USB controller.
To disable the default pull-down to avoid signal contention in GPIO mode.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Building the HEX file is optional (CONFIG_BUILD_OUTPUT_HEX), so
`bmp_flash` will fallback to elf_file if missing. Additionally, to
maintain section names the HEX is only used if it is signed.
Signed-off-by: John Whittington <git@jbrengineering.co.uk>
The cfg.elf_file is not signed, so `west flash` with a sysbuild will
not run the application if MCUboot image signature checking is on. Using
the cfg.hex_file for `bmp_flash` resolves since as the signed hex is
used when using sysbuild. Symbols are not required for flashing so the
switching from elf to hex is not an issue.
Signed-off-by: John Whittington <git@jbrengineering.co.uk>
Guard use of I2S_EnableSecondaryChannel behind the SDK feature macro
that determines if this support is available, since when this macro is
not defined the SDK function is not implemented.
Fixes#68136
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Make sure that scan band string is properly terminated when
parsing user supplied string.
Fixes: #67944
Coverity-CID: 342930
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When ENABLED flag is used, we generate 32 byte DTLS
Connection Identifier and include that in our
DTLS Client HELO. This has no benefit as client only
has one connection toward the server, it does not need
any identification.
When SUPPORTED flag is used, we just include
zero length Connection Identifier in the handshake,
which tell server that we support Connection Identifier
and server can generate one for it.
We then use the CID in the packets that we send towards
server, but response packets don't contain any CID.
This gives all the benefit of CID as server is able to
identify us even when NAT mapping have changed.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Clarify some documentation regarding DTLS settings.
Set default QUEUE uptime to 30s, which would be same as
most cellular networks use, and nRF SDK use.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Update the EFR32BG22, BG27 and MG24 device files inside
gecko/Device/SiliconLabs/ from gecko_sdk to align the codebase of
hal_silabs with gecko_sdk 4.4.0.
Signed-off-by: Sateesh Kotapati <sateesh.kotapati@silabs.com>
If an att buf is destroyed during bearer teardown, we want to avoid
using and passing invalid references to the application.
Double-check that the current bearer, the ATT object and the ACL conn
objects it is attached to are not NULL before proceeding.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Set the correct VCO input range for the PLL frequency
with each bit PLL1RGE of the PLL1CFGR register
This get_vco_input_range is similar to the stm32h7 one.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Move DHCPv4 client tests to subdirectory, to make room for DHCPv4 server
tests.
Rename test project to dhcpv4_client to better reflect its purpose.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Adds a configurable delay to the test threads. It exists to keep
thread0 from hogging the scheduler's spin lock and giving threads
on another core a better chance to obtain that lock and not starve.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add a note about the addition of a can_mode_t argument to the
can_transceiver_enable() API call.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Propagate the current CAN controller operation mode to the CAN transceiver
when enabling it.
Some more advanced CAN transceivers, especially those supporting Partial
Networking (CAN PN), require knowledge of the intended CAN operation mode
(e.g. normal mode vs. listen-only mode).
This commit simply prepares the CAN transceiver API for supporting such CAN
transceivers, although no in-tree drivers require this information yet.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
clear_log is used to prevent a common pytest log error,
which makes logs unusable in testing.
Such a fix is useful for all tests,
so it should be autouse by default.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commits makes it possible to use the onboard bluetooth
module (STM32WB5MMG) with existing zephyr bluetooth samples.
Note that there was no hardware flow control wiring
available on the board, which is why it has been disabled
in the both main board and BLE module Device Tree. As the
board doesn't support HW flow control, users must set
CONFIG_BT_HCI_ACL_FLOW_CONTROL=n in project files.
Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
This patch introduces the Bluetooth Low Energy (BLE) feature to the board.
The board utilizes the STM32WB5MMG as the BLE module. However, As there
was no BLE controller available for this module. Therefore, a board
support package has been added to enable the STM32WB5MMG module to act as
a BLE controller. This is achieved by running Zephyr's hci_uart example on
the STM32WB5MMG module which enables communication with the main
microcontroller over the H:4 HCI transport protocol. So, users must first
build the BLE controller for the BLE module and upload it via on board
ST-Link,then they can uses Zephyr Bluetooth demos on the development board
Note that there was no hardware flow control wiring available on the
board, which is why it has been disabled in the both main board and BLE
module Device Tree.
Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>