When executing the bt_audio_broadcast_source_reconfig the streams
did not get assigned the new QoS, the ISO parameters were not
properly updated and the codec was not set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a replacement cmsis_compiler.h header for the nrf52_bsim target.
Partial version for now, we can more of its contents when needed.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Fixes using wrong status bit for ADS1119_STATUS_MASK_ID. Moreover
using BIT(8) does not make much sense for working with uint8_t.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add an option to generate simplified error codes instead of more
specific architecture specific error codes. Enable this by default in
tests to make exception tests more generic across hardware.
Fixes#54053.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Added new CC1352P1 LaunchXL board supporting 20dBm TX for its
sub-GHz radio.
Note that the board has a multiplexer circuit to switch between
2.4GHz, High-Power TX and Sub1GHz states, for which a custom board
module was implemented, together with board-specific device-tree
bindings and pinctrl definitions for each of the RF states.
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
Enhance IEEE802154 Sub-GHz driver to support CC13x2P's internal power
amplifier (20dBm) for TX.
Note: requires board-specific antenna switching for it to work
properly.
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
Add SOC_CC1352P and SOC_CC2652P chip types to SoC's Kconfig
(with integrated high power amplifiers).
Also requires modifications to HAL TI's family conditions.
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
New KConfig option to set `CCFG_FORCE_VDDR_HH` inside CC13xx/CC26xx
customer configuration file, making it it possible to use 14dBm
TX power (instead of the default 13 dBm limitation).
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
Recent Zephyr changes (IEEE 802.15.4 config moved from KConfig
to DeviceTree) left the TI CC1352r1_launchxl board's net examples in
a non-working state, mainly due to the fact that CC13x2 has two
IEEE802154 interfaces available (2.4GHz and sub-GHz) and none were
enabled.
This commit enables the 2.4GHz radio inside the board's DTS and also
introduces a new devicetree overlay inside the echo* samples:
'boards/boards/cc1352-enable-subg.overlay', enabling the sub-GHz
interface.
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
I get a high failure rate for tests/kernel/mem_protect/stack_random
because the default rand32_timer used with QEMU is just too mediocre.
Make it more random looking.
Reference: https://nuclear.llnl.gov/CNP/rng/rngman/node4.html
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
If the ACL disconnects, then the unicast server cannot send
a notification to the client about the endpoint and
stream being released. We now call the released callback
if the stream's endpoint was not idle before the disconnection.
Similarly the unicast server (ASCS) did also not call the
released callback if the ACL disconnection causes a endpoint
release.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Picolibc version 1.8 was recently released. This release includes
a bunch of patches made to support Zephyr.
Signed-off-by: Keith Packard <keithp@keithp.com>
The set assignee script currently exits if there's too many labels
associated with a PR. Change that to just skip the label assignment, but
continue on to assign a maintainer based on the most relevant area.
Tested with:
./scripts/set_assignees.py -v --dry-run -P 52716
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a compiler option to not merge globals. gen_kobject_list.py
is not capable of distinguish addresses of merged objects. The script
itself does not look wrong. The dward specification says that the
attribute DW_AT_location with opcode DW_OP_addr encodes a machine
address and whose size is the size of an address on the target machine
but for merged objects the address is longer, not clear why.
Disable global merge when userspace is enabled to avoid this problem.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
When turned on, the existing i2c dump code is use to log every I2C
transaction at debug level.
This can be very useful for detecting problems with I2C peripherals.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
If an i2c message is for just one byte, instead of logging it with a
hexdump after logging the other message info, just added the one byte to
the same log message.
Since most i2c messages are one byte, this significantly reduces the
number of messages and lines needed to log i2c transactions, from three
line per message to just one. It's also a lot easier to read.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
Add an argument to i2c_dump_msgs() to log the data from reads too. And
then rename the function to i2c_dump_msgs_rw() so the API doesn't
change. If the dump is done after a transaction is processed, as
opposed to before, then the read data is valid and can be very useful.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
glibc and newlib print "(nil)" for NULL pointers while picolibc just prints
"0". Allow either by replacing the exact "(nil)" match with ".*" instead
Signed-off-by: Keith Packard <keithp@keithp.com>
When estimating the time that a given SPI transfer will take, whole
buffer sets for TX and RX need to be taken into account, not only their
first parts. Correct `spi_context_wait_for_completion()` accordingly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
spi_nor_sfdp_read is now called from spi_nor_process_sfdp for the
CONFIG_SPI_NOR_SFDP_RUNTIME case and that could be defined without
CONFIG_FLASH_JESD216_API being defined
Signed-off-by: Michael Larson <larson@whisper.ai>
Adjust the size of the stm32_flash_layout[] table depending on the
bank configuration of the stm32u5 or stm32l5 devices.
That will avoid div by zero error in flash_get_page_info()
if the layout_size is not correct.
Assign the *layout_size only once with the correct value : 3 or 1.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Lock I2C device state when used so that Power Manager doesn't
suspend the device.
Initial state is a suspended device.
Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
Clock and pins used by the I2C device are suspended when power
manager requires it.
Do not compile function i2c_stm32_suspend when PM_DEVICE isn't
enabled as it is left unused and will make the compiler throw
a warning.
Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
Common STM32_EXTI_LINE_NONE for declaration and setting
of wakeup EXTI line when configured.
Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
Update emulator documentation with a diagram and description for how to
use the .bus_api and ._backend_api parameters with EMUL_DT_DEFINE().
Signed-off-by: Keith Short <keithshort@google.com>
The emulator structure currently initializes a bus-level API that is
used to communicated register accesses to the emulator from the parent
bus.
Add support for declaring a backend API for emulators. This provides
tests a common way to interact with emulators of the same device type.
Signed-off-by: Keith Short <keithshort@google.com>
Not all emulators correspond to a real driver. Notably some tests don't
require a real driver. Provide a macro that initializes a stub driver.
Signed-off-by: Keith Short <keithshort@google.com>
This commit aims at updating the drivers stop function to better
follow the CAN header file which specifiec that stopping the CAN
controller should "abort any pending CAN frame transmissions".
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.
Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add Bluetooth HCI USB transport layer implementation for the new
experimental USB device support based on the existing implementation
subsys/usb/device/class/bluetooth.c.
This implementation, unlike existing one, contains the interface
descriptors for isochronous endpoints. Since we do not support voice
channels, these are just there to avoid issues with Linux kernel btusb
driver when this implementation is part of a composite configuration.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Zero data payload size for isochronous endpoints is a
is a valid setting for default interface.
Also do not update MPS of control endpoint since it is
set by the driver.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The change enables the ethernet driver to save statistics in a
structure in the ethernet driver API structure. In addition, the
change also attempts to update error statistics based on errors
reported in the STM32 ethernet HAL API.
Fixes#53995
Signed-off-by: Chamira Perera <chamira.perera@audinate.com>
The CAAM hardware needs to read RNG values into a non-cache
buffer. Since the contract to Zephyr RNG functions do not
require non-cache buffers, we use an intermediate non-cache
buffer to retrieve results.
Added a Kconfig to control the size of the intermediate buffer.
Fixes#53035
Signed-off-by: David Leach <david.leach@nxp.com>
allow disabling reports (synchronise but don't generate sync reports)
and allows enabling sync reporting with filtering of duplicates.
the default option remains to establish sync, with sync reports,
but without duplicate filtering.
Signed-off-by: Raphael Treccani-Chinelli <raphael.treccani@nordicsemi.no>
Devices with write block size greater than 16 could not use settings_fcb
due to small buffer size.
Update value in test as well.
Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
While GitHub encourages using single account for both personal and work
purposes (even recommends merging multiple accounts into one), there are
some serious downsides when doing so.
The biggest disadvantage of using one account is the inability to select
which email address the "Rebase and merge" action will use. GitHub, at
least as of today, always uses primary email address for "Rebase and
merge" action.
Another issue is selecting email for notification based on organization.
Custom email routing can only be configured if you are organization
member (or at least outside collaborator). While this works reasonably
fine for zephyrproject-rtos organization, I cannot route e.g. mcu-tools
organization emails to my work email.
To avoid the issues I have decided to use dedicated GitHub account for
my Nordic Semiconductor related work activities: tmon-nordic
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Bluetooth does not need to be enabled to register services,
therefore the newly introduced automatic bluetooth SMP transport
registration system can be simplified by returning enabling of
bluetooth back to the application.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
There is a pending TODO regarding unifying net_tcp_unref() and
net_tcp_put(). Given that net_tcp_unref() is no longer used by the upper
layer (it should only use get/put APIs), the function can be removed
from external TCP API, as referencing/dereferencing is now only used
internally by the TCP stack.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The net_context/TCP connection context ref counting needed to be fixed,
to avoid situation where TCP connection context could be released
before net_context is released.
Generally, this commit modifies the ref counting of the above as
follows:
* net_context is referenced both by the application and TCP stack, when
created.
* TCP context is referenced by the application when created. The TCP
stack adds ref to the TCP context only after connection has been
established.
* TCP stack needs to call the final upper layer callback when connection
is closed, but before the TCP context is released (i. e. to give upper
layer chance to dereference the context on its side). For this,
tcp_conn_close() was introduced which is called from within TCP stack
instead of directly dereferencing the TCP context.
* TCP stack dereferences the net_context only after the TCP context has
been released (i. e. upper layer has dereferenced TCP context on it's
side and connection has been tear down, if established).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>