When updating the Scan Delegator receive state, we shall only
set the BIS indexes in bis_sync that we are actually synced to.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Functions `zephyr_linker_dts_memory()` and `zephyr_linker_dts_section()`
are described as defining a memory region or section based on a DT node,
as long as it "exists and has status okay". However, only the existence
of the node is actually checked, using `dt_node_exists()`. To fix that,
employ `dt_node_has_status()` instead, which can check both conditions.
The status check is important, because both functions require the given
DT node to contain a `zephyr,memory-region` property (not to be confused
with the compatible string). This property is required by the associated
binding as well, but required properties can be omitted from nodes which
don't have status "okay". In those cases, edtlib won't raise an error,
and neither should CMake, because those nodes should be ignored.
Speaking of that property, add a missing error check for it as a bonus
(tucked behind the status check, of course).
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Calling this function with an output variable named `var` or `okay`
could produce an incorrect result, due to the variable being mishandled.
Add simple changes to avoid this.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
ZBus had one break change related to the runtime observers'
configuration, and the VDED delivery sequence has changed. This commit
adds entries on the migration guide about the mentioned changes.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Add documentation for the new way to storage observers, the message
subscribers, and the confirmed message sample.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
In commit commit c19c6fb438
("Revert "scripts: west build: default build.pristine to auto""),
we set the default --pristine value back to 'never', but the
documentation never got updated. Fix it.
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
This commit adjust the chat scripts for the simcom
sim7080 and gsm_ppp compatibles to fix an issue found
when trying to use a sim7080 modem. The CMUX command
includes optional parameters which are not identical
for all modems, so the AT+CMUX command has been adjusted
to only contain the mandatory parameters.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
This commit increases the buffer used for commands
in the control channel within an instance of the
modem_cmux module. The buffer was not large enough to
store an MSC command if the optional break signals
where included. This commit fixes the issue and
updates the test suite to use the max size MSC message.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
Fixes a typo in the release notes where two 'Arm' entries were
present, and the first should have been 'Arc'.
Signed-off-by: Kevin Townsend <kevin.townsend@analog.com>
Use the same pins as when testing with SIUL2 EIRQ interrupt
controller, but instead test routing the external interrupts
to WKPU controller.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
When configuring in/out pins for callback tests, pass the GPIO flags
coming from the in/out-gpios respective nodes.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Enhance the documentation by providing an explanation of WKPU
interrupt controller support and how it integrates with GPIO.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Define WKPU interrupt controller node and its respective interrupt
sources mapping to GPIO pins.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Extend the NXP S32 GPIO driver to be able to route external interrupts
to either SIUL2 EIRQ interrupt controller or, when available on the
SoC, WKPU interrupt controller.
Since WKPU can support up to 64 external interrupt sources and SIUL2
EIRQ up to 32, gpio_get_pending_int() is removed and the interrupt
controller specific API must be used instead.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Introduce an interrupt controller for the NXP S32 WKPU peripheral
that can be integrated with GPIO to trigger interrupts through
external interrupt pad inputs.
WKPU can trigger interrupts from certain input pads that support this
function, as well as wake-up events to the power management domain. This
patch only adds WKPU functionality as an interrupt controller to extend
the number of input pads that can interrupt the core. Power management
functionalities are not supported.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
In the broadcast_audio_sink sample there are two pointers defined,
both referencing the same address. We reduce this to one pointer
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
When we have an empty Devicetree, ie,
```
/dts-v1/;
/ {
};
```
The node's dep_ordinal is never initialized because the node graph is
empty. This ends up with invalid ordinal tokens (-1) in
devicetree_generated.h which in turn produce some cryptic compiler
errors, see e.g.
```
error: pasting "dts_ord_" and "-" does not give a valid preprocessing
token
95 | #define Z_DEVICE_DT_DEV_ID(node_id) _CONCAT(dts_ord_,
DT_DEP_ORD(node_id))
...
include/zephyr/devicetree.h:2498:41:
note: in expansion of macro 'DT_FOREACH_OKAY_HELPER'
2498 | #define DT_FOREACH_STATUS_OKAY_NODE(fn)
DT_FOREACH_OKAY_HELPER(fn)
|
^~~~~~~~~~~~~~~~~~~~~~
include/zephyr/device.h:1022:1:
note: in expansion of macro 'DT_FOREACH_STATUS_OKAY_NODE'
1022 |
DT_FOREACH_STATUS_OKAY_NODE(Z_MAYBE_DEVICE_DECLARE_INTERNAL)
```
(devicetree_generated.h)
```
...
#define DT_N_ORD -1
#define DT_N_ORD_STR_SORTABLE 000-1
...
```
This patch makes sure root node is always inserted (without any target)
so that it gets initialized later.
Discovered as part of
https://github.com/zephyrproject-rtos/zephyr/pull/63696
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Make `kconfig.py` not crash when any one of these settings is undefined:
* DEPRECATED
* EXPERIMENTAL
* WARN_DEPRECATED
* WARN_EXPERIMENTAL
While these will continue to exist in Zephyr, they shouldn't be strictly
required for the script to work. One situation in which they could go
missing is when a user creates an application-specific Kconfig root, but
forgets to source "Kconfig.zephyr" inside it - not that this is expected
to work anyway, but it could at least raise a more intelligible error.
Note that when WARN_DEPRECATED is undefined, selecting DEPRECATED will
always produce warnings. Same with WARN_EXPERIMENTAL and EXPERIMENTAL.
This matches the fact that the WARN_* symbols normally have `default y`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
These variables need to be converted to absolute paths internally, but
so far this has only worked when each value consisted of a single path.
Add a common loop to handle lists of paths.
As a bonus, run `string(CONFIGURE)` to expand those variables in the
same way as the regular CONF_FILE and EXTRA_CONF_FILE.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
in case CONFIG_VL53L1X_INTERRUPT_MODE=n or
CONFIG_VL53L1X_XSHUT=n, the driver won't compile
Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
There is inherent race condition between i2s_nrfx_write() and I2S
interrupt handler because I2S operates independently from the rest
of the system. If software takes too long to supply next TX pointer
then nRF I2S peripheral will simply resupply the previous buffer.
The race window is rather short. The failed race executes as follows:
1. i2s_nrfx_write() checks state and loads next_tx_buffer_needed
2. I2S interrupt handler executes and calls data_handler() which
notices empty TX queue and therefore sets next_tx_buffer_needed
3. i2s_nrfx_write() continues with the queue TX path (because the
next_tx_buffer_needed was false when it was accessed)
If next i2s_nrfx_write() executes before next I2S interrupt:
4a. i2s_nrfx_write() notices next_tx_buffer_needed is true and
supplies the buffer directly to I2S peripheral. Previously queued
buffer will remain in the queue until the just supplied buffer
starts transmitting. Effectively swapping whole I2S block leads to
clearly audible artifacts under normal circumstances.
If next I2S interrupt executes before next i2s_nrfx_write():
4b. data_handler() notices that buffer was reused and stops despite
having a buffer available in TX queue
Modify i2s_nrfx_write() to always queue the TX pointer first and only
supply the buffer to nrfx if the queue was empty when interrupt handler
executed. This prevents both the out-of-order TX and premature stop.
Fixes: #63730
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Fixes: #63771
The 'compiler/*/generic.cmake' is intended to set a C preprocessor which
can be used for devicetree preprocessing.
No C++ compiler is needed as host tool and should therefore not be set
in this file.
Remove the code to avoid setting a not required C++ compiler.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Better group for logging tests removing verbosity and redundancy in
identifiers and making the sub-component a bit more uniform and clear.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This allow to run the following PTS test:
- DFU/SR/FD/BV-06-C
- DFU/SR/FD/BV-13-C
- DFU/SR/FD/BV-14-C
- DFU/SR/FD/BV-15-C
- DFU/SR/FD/BV-16-C
- DFU/SR/FD/BV-17-C
- DFU/SR/FD/BV-18-C
- DFU/SR/FD/BV-22-C
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If the previous upload was in-band and it didn't complete, the slot will
stay reserved. By design we release slot not at the end of the upload
phase, but at the start of a new upload phase.
This fixes DFU/SR/FD/BV-13-C.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If a Fw Distribution Client sends the Upload OOB Start message, but the
application layer didn't call bt_mesh_dfd_srv_oob_check_complete yet,
we have no other option other than ignore the message. The next phase
in this case could be Transfer Active, Transfer Success or Failed and it
will be set only after Check Firmware OOB procedure completes.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This message _at least_ 2 bytes long, but can be longer, thus
BT_MESH_LEN_MIN should be used.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
In OOB upload, when Check Firmware OOB procedure completes successfully
and the firmware is already received, we send Firmware Distribution
Upload Status message with update Phase set to Transfer Success. In this
case, we must set Upload Progress to 100%. This can't be done through
the callback as the application layer doesn't yet know that the firmware
is already received. This will happen by the exist from
bt_mesh_dfd_srv_oob_check_complete function, which will return error
code -EEXIST.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>