Updated dts for MCXN94x with support for CTimer.
Signed-off-by: William Tang <william.tang@nxp.com>
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
After moving to HWMv2 em_starterkit_emsk_em11d_defconfig file was omitted.
Some of tests for the emks_em11d platform became broken.
This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/71753
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Ignore LE 2M PHY being set in Initiating_PHYs of the
LE Extended Create Connection command.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adapts flash writing for BLOB IO to RRAM. The previously used write
block alignment is not needed for RRAM.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
An audio stream is unidirectional, so it's always either
TXing or RXing, so the fields can safely be moved to an
enum.
The struct now has both a is_rx and is_tx field. The reason
why two bools are being used, is that the both of them may
be false (we need 3 states).
All access to the rx and tx structs in the union shall be
guarded by these fields.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There are several esp32-based boards that its conf and overlay
files are missing proper renaming to match cpu cluster.
This also removes all _SOC_ name from files.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Added write of strobe register after setting long press reset
configuration. This is needed to apply the new value.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
IRQ handling functions are now in interrupt controller.
Enable necessary KConfigs to support CLIC properly.
A nice side effect of enabling RISCV_PRIVILIGED is that
`vector.S` is no longer necessary as common code handles
that.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
We could start executing the work item after the channel has been
disconnected or destroyed, due to a race condition.
Double-check we are connected before attempting to send data.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This check is repeated many times in `gatt.c`, with various comments.
This patch refactors these occurrences into a named function.
Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/41789
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
We can't just keep blocking the syswq, people be mad.
Override the timeout value so we always have K_NO_WAIT.
Also print a message to whomever's listening.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
OTS requires that indications about state change are sent after
response to ATT Write.
OTS Specification p.4.4.4.: "An OLCP or OACP operation is started
when the ATT Write Response is received from the Object Server as
a result of the Object Client writing an Op Code to a control point
to perform some desired action. The control point operation ends
when the Object Server sends an indication to the Object Client
with the Op Code set to Response Code."
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
To make it easier to understand the code, the following was done:
- Use INITIATING/ADV for state names that are exclusive to central
or peripheral. Previously it was not necessarily clear that the state
BT_CONN_CONNECTING was for central only by just looking at where
it was used. The terms INITIATING/ADV were used in favor
of central and peripheral as these terms also work for SCO connection
establishment.
- BT_CONN_CONNECTING_SCAN -> BT_CONN_SCAN_BEFORE_INITIATING
to make it more clear that we are not scanning and connecting at
the same time. The new name should make it more clear why we are
scanning - only with the intention to start the initiator later.
- BT_CONN_CONNECTING_AUTO -> BT_CONN_INITIATING_FILTER_LIST.
This makes it clear that this state is something different than
BT_CONN_AUTO_CONNECT.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
When initially reading some of the host code it was unclear to me
why they were needed an how they are used.
By adding some documentation,
this can hopefully make it easier for others to understand these.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Fail a test run gracefully when an unknown test level
is requested to execute with the current test plan.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
1. Correct node label in k64 overlay for ptp test
- Not sure if this actually matters since it appears
that actual hardware is no longer tested in net tests
2. Include fsl_enet with <> instead of "".
3. Build the ptp clock driver only if the ethernet driver is built
- Technically I think the 1588 timer should be able to be used
even if the ethernet mac is not used, but I would imagine this
to be an extraordinarily rare, weird, and niche use case, so to fix
the current CI error caused by net test disabling ethernet drivers,
couple the ptp clock driver to the ethernet driver in the build
configuration.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The following warning is issued by clang:
warning: field within 'struct gatt_chrc' is less aligned than 'union
gatt_chrc::(anonymous at subsys/bluetooth/host/gatt.c:1859:2)' and
is usually due to 'struct gatt_chrc' being packed, which can lead
to unaligned accesses [-Wunaligned-access]
This is due to the fact that the uint16_t uuid field requires 2-byte
alignment but it is not marked as packed. Since the enclosing struct is
indeed packed, the required alignment is not guaranteed and so clang
complains. Fix it by ensuring that the union is marked as packed too.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Negative error codes cannot be returned if the function returns an
unsigned integer. Change function's API to return the read compare
register value through a pointer and the actual result as a signed
integer.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Based on Andy's talk at eoss 2024, use the sys/sem.h api instead
of the spinlock.h api to synchronize pooled elements since it
has minimal overhead like semaphores but also works from
userspace.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
SYS_SEM_LOCK() is a for-loop-like macro similar inspired by
K_SPINLOCK().
Add an entry to .clang-format so that autoformatting works as
expected.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add SYS_SEM_LOCK() and SYS_SEM_LOCK_BREAK which are mostly the
same as K_SPINLOCK() and K_SPINLOCK_BREAK.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Deprecate the advertiser options `BT_LE_ADV_OPT_USE_NAME` and
`BT_LE_ADV_OPT_FORCE_NAME_IN_AD`.
Reasons:
- It is out of place in the advertiser options, as it acts on
advertising data and not configuration
- The behavior is not clear. All of these are trick questions:
- where does the data for the name go?
- do I have to allocate memory for this?
- does it work the same in legacy vs extended advertising?
- The trade-off between UX improvement and extra complexity in the host
is debatable. Hundreds of lines in the stack to avoid making the user
type out less than ten.
Also deprecate the following macros that uses those options:
- `BT_LE_ADV_CONN_NAME`
- `BT_LE_ADV_CONN_NAME_AD`
- `BT_LE_ADV_NCONN_NAME`
- `BT_LE_EXT_ADV_CONN_NAME`
- `BT_LE_EXT_ADV_SCAN_NAME`
- `BT_LE_EXT_ADV_NCONN_NAME`
- `BT_LE_EXT_ADV_CODED_NCONN_NAME`
Update the migration guide and the release note for Zephyr 3.7 to
describe those changes.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The advertiser options to automatically add the name in the scan
response and the advertising data will be deprecated.
The Mesh files `proxy_srv.c` and `pb_gatt_srv.c` were using
BT_LE_ADV_OPT_USE_NAME. Add the device name in the advertising data
directly.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The advertiser options to automatically add the name in the scan
response and the advertising data will be deprecated.
Update the Bluetooth shell and its documentation to not use those
options anymore.
The option of the legacy advertiser run with `bt advertise` and the
behavior hasn't changed. The code has been updated to no longer use the
advertiser option but the original behavior has been reproduced.
The option of the extended advertiser have been updated to be more
explicit. The options `name` and `name-ad` have been removed from the
`bt adv-create` and `bt adv-param`. The option `name` and `dev-name`
have been added to the `bt adv-data` command.
- `name <str>` will advertise the given name.
- `dev-name` will advertise the device name.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The advertiser options to automatically add the name in the scan
response and the advertising data will be deprecated.
Update the samples that were using those options by explicitly adding
the device name in the advertising data or the scan response data.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The advertiser options to automatically add the name in the scan
response and the advertising data will be deprecated.
Update the tests that were relying on those options. A lot of test were
actually not using the name, for those the name have simply been
removed. For the others that were using the name, add it in the
advertising data or the scan response data.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
With the deprecation of the advertiser options to automatically add the
device name in the scan response and advertising data, some macro used
to set the advertiser parameter also became deprecated. That's the case
for `BT_LE_EXT_ADV_CONN_NAME` and `BT_LE_EXT_ADV_SCAN_NAME`. The issue
is that those two macro didn't had their equivalent without including
the name. So this commit add `BT_LE_EXT_ADV_CONN` and
`BT_LE_EXT_ADV_SCAN` to be used instead.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This is an API test and it was not designed to run in a real target.
Some attempts to run this test in devices cause the device to hang
after the test execution because the device sleeps and no wake up
source is set.
Fixes#68453
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
We are not able to achive 50ppm on nRF54L.
Working on fixing it propperly, but untill we do set what we get.
Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
After the move to C files we got some drop in the performance when
running latency_measure. This patch declares the priority queue
functions as static inlines with minor optimizations.
The result for one metric (on qemu):
3.6 and before the anything was changed:
Get data from LIFO (w/ ctx switch): 13087 ns
after original change (46484da502):
Get data from LIFO (w/ ctx switch): 13663 ns
with this change:
Get data from LIFO (w/ ctx switch): 12543 ns
So overall, a net gain of ~ 500ns that can be seen across the board on many
of the metrics.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The gen_kobject_list.py script looks at DWARF debug information in the
elf file to determine the address of variables. Make sure that when
looking at DW_FORM_exprloc, it looks at both DW_OP_addr and
DW_OP_plus_uconst.
Signed-off-by: Nick Goote <ngoote@gmail.com>
Adds some documentation about the Xtensa HiFi AudioEngine DSP and
how to enable its use with Zephyr.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Check possible overflow in k_stack data struct. An overflow
can happens resulting in a much smaller amount of memory allocation.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixed order of mepc and _mcause in esf for 32bit stacking.
Added missing stack pointer alignement bit support.'
Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
Rework USBD shell to take speed arguments into account and revise
command help text. Rename some of the commands to better reflect what
they actually do.
Since most of the init code changes, rewrite the command to initialize
the default configuration in the shell to register all available
classes, but not to enable USB device support in a single command.
This will allow earlier notification in the future, if supported by the
controller, before the USB device controller is enabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
For the last dozen commits, the role of usbd_class_node has actually
been taken over by usbd_class_iter. After cleaning up and merging
usbd_class_node and usbd_class_data, we can rename usbd_class_iter to
usbd_class_node to better reflect its role.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Since only usbd_class_node contains the class instance data, rename it
to usbd_class_data.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>