Some TFM samples run different test suites/cases based on
which configurations are set.
Enumerate more of these.
For samples/tfm_integration/tfm_psa_test,
add the following new build configurations:
* Add CONFIG_TFM_PSA_TEST_STORAGE
* Add CONFIG_TFM_PSA_TEST_CRYPTO
* Add CONFIG_TMF_PSA_TEST_INITIAL_ATTESTATION
For samples/tfm_integration/tfm_regression_test,
add this to all build configurations:
* Add CONFIG_TFM_PARTITION_PROTECTED_STORAGE
* Add CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
* Add CONFIG_TFM_PARTITION_CRYPTO
* Add CONFIG_TFM_PARTITION_INITIAL_ATTESTATION
* Add CONFIG_TFM_PARTITION_PLATFORM
* Add CONFIG_TFM_PARTITION_AUDIT_LOG
And build the above for CONFIG_TFM_IPC as well.
Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Extra steps for programming the external memory on nRF5340 DK are
no longer needed. Now west is capable of handling this itself.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Despite the comment it contains, the initialization procedure for
the external memory chip on nRF5340 DK does not enable the High
Performance Mode in the chip, so communication using a frequency
higher than 8 MHz fails and the sample crashes (it works only right
after programming the chip with nrfjprog, which enables the High
Performance Mode, but the chip returns to the Low Power mode after
the board is power-cycled).
This commit fixes the initialization procedure and performs some
additional clean-up.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In the Zephyr implementation, `sem_timedwait()` uses a
potentially wildly different timebase for comparison via
`k_uptime_get()` (uptime in ms).
The standard specifies `CLOCK_REALTIME`. However, the real-time
clock can be modified to an arbitrary value via clock_settime()
and there is no guarantee that it will always reflect uptime.
This change ensures that `sem_timedwait()` uses a more
consistent timebase for comparison.
Fixes#46807
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Renaming objects which had 2 in the name to indicate that
it is v2 specific. Once logging v1 has been removed such
suffixes are redundant.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This patch modifies the ADXL362 driver to use the new
SENSOR_TRIG_MOTION trigger for activity detection
and SENSOR_TRIG_STATIONARY for inactivity detection.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Logging v1 has been removed and log_strdup wrapper function is no
longer needed. Removing the function and its use in the tree.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Cocinelle complains about "shell" being used as a parameter name:
"Violation to rule 5.7 (Tag name should be unique) tag: shell"
Therefore rename the parameter throughout the sample to "sh".
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rewrite the TCP/UDP download part of the zperf sample to use socket API.
For UDP, performance impact is negligible (< 1 Mbps), for TCP it's
noticable, but still throughputs can be considered satisfactory (up to
~75 Mbps).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rewrite TCP/UDP upload part of the zperf sample to use socket API
instead of net_context. This has a negligible impact on the upload
throughputs (< 1 Mbps).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Whenever MBEDTLS_BUILTIN is selected then
CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h" is set as a default value.
Remove explicit configuration from prj_mtls_shim.conf.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Modified the samples such that the client will attempt to
setup 2 sink streams and 1 source stream, basically
representing a headset use case.
This also excercises both setting up a unidirectional
and a bidirectional ISO channel using the 3 audio streams.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The sample used `net_buf_ref` to send the same data multiple
times on multiple streams, but the send procedure, which
ends up calling bt_conn_send_cb, does not work
with multiple refs. We thus replace the refs with net_buf_clones.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This code has gone unmaintained and bugs continue to be reported
against it. We do not have the resources as a project to maintain this
in "odd fixes" mode, and nobody has stepped up to maintain it [1], so
sadly this must be removed for now.
If anyone would like to see civetweb supported in upstream Zephyr
again, they are welcome to add it back, as long as they promise to
maintain it going forward.
Many thanks to everyone who has contributed to civetweb support in
Zephyr while it was here. So long and thanks for all the fish.
Fixes: #45807Fixes: #43910Fixes: #34226Fixes: #46743
[1] https://lists.zephyrproject.org/g/devel/message/8466
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The value of CONFIG_SYS_CLOCK_TICKS_PER_SEC has side-effects that
are not expected with tickless kernel mode. In bug #46378, application
code is shown to run slower with higher sys clock tick value. In SOF
bug #5921, audio quality issues were root-caused to k_timer inaccuracy
with 50000 sys clock tick.
Set the the value to 15000 for all SOF applications. All existing
test cases pass with this value.
BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/46378
BugLink: https://github.com/thesofproject/sof/issues/5921
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The timeout was accidentally changed from 60 seconds
to 0.6 seconds.
This commit also fixes the number of prints, since we are now
sending at 10ms intervals.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Samples peripheral_gatt_write and central_gatt_write to
demonstration use of GATT Write Command.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update the readme for mpu_test sample to contain
correct sample outputs for mpu read, write and run operations.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The controller does not support connected ISO yet, so it does not make
sense to build it form devices that build both host and controller.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as we work
on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Remove v1 implementation from log_core and all references in the tree.
Remove modules used by v1: log_list and log_msg.
Remove Kconfig v1 specific options.
Remove Kconfig flags used for distinction between v1 and v2.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Files including <zephyr/kernel.h> do not have to include
<zephyr/zephyr.h>, a shim to <zephyr/kernel.h>.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
...v1.1 overlay
Shows the dependencies which makes it easier to enable the content
format when necessary
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Enable I2C access to FXOS7000 sensor on the mixrt595_evk board
Tested using samples/sensor/fxos8700 for mimxrt595_evk_cm33.
Signed-off-by: Chay Guo <changyi.guo@nxp.com>
All the gpio drivers are based on devicetree and thus we always set
HAS_DTS_GPIO, thus we don't need this Kconfig option anymore. Remove
uses as its safe to assume DTS is supported for GPIO.
Signed-off-by: Kumar Gala <galak@kernel.org>
This test only runs on one platform, so make sure we do not exclude the
only platform using some other hardware related filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The logging subsys has evolved to a point where XCC/GCC cannot
compile anymore as it only supports C++98. So exclude C++
samples from build. And just use XCC/Clang instead for C++.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This sample app uses a stack buffer to hold the interface name which is
generated at runtime using sprintk. The buffer is only sized for the
expected range of values, not the full possible range of the datatype
(int).
To mitigate this, increase the size of the buffer to hold the full range of
an int value.
Signed-off-by: Keith Packard <keithp@keithp.com>
By default, any string or opaque data that LwM2M engine initializes
sets data lenght to same value as given buffer length for that
resource.
However, on run time, engine keeps track how much data is written
to each resource, so when reading from any resource, should only
return data that has been written there. But uninitialized resources
return the content of the whole buffer.
Fixed the problem by introducing macros INIT_OBJ_RES_LEN(),
INIT_OBJ_RES_MULTI_DATA_LEN() and INIT_OBJ_RES_DATA_LEN() that
allows you to give the amount of data existing in buffer when
the resource is initialized. This sets the data_len and max_data_len
variables correctly.
Also introduced new functions lwm2m_engine_get_res_buf() and
lwm2m_engine_set_res_buf() that distinct between data size and
buffer size. Deprecated the previous functions
lwm2m_engine_get_res_data() and lwm2m_engine_set_res_data()
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
XCC does not support _Generic as it is being used by the runtime
tagged argument feature. So exclude them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rename the BT_ISO_INTERVAL_MIN/MAX to
BT_ISO_SDU_INTERVAL_MIN/MAX to avoid confusing this
the the ISO interval which is different from the SDU
interval.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add two new parameters to bt_iso_chan_send:
sn: The packet sequence number which shall be incremeted
per SDU interval.
ts: An optional timestamp value used to synchronize SDUs.
The sequence number in the API uses a 32-bit value even though
the sequence number for the HCI command is 16-bit. This is to
properly handle wrapping of sequence numbers, which is much
easier to do with additional bits allocated.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The reserved memory mechanism (sections and regions definition) has been
entirely replaced, greatly extended and made it better by the work done
on the zephyr,memory-region compatible.
Since there is are no actual users, we can remove it.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
- Inform about the requirement to configure ADC channels in Devicetree
- Fix sample output example
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Improve include list, so that file is self-contained
- Don't use an array type for the samples buffer, as its length is 1
- Improve some error messages
- Use PRId16/32 for printing fixed-width signed integers
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Simplify sample by relying exclusively on channel data from Devicetree.
This change makes sample simpler and more portable at the same time.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
It is now possible to configure ADC channels in Devicetree. This makes
code more portable, since there is no need to hardcode hardware specific
bits in the C sources.
This patch adds channel/s configuration for all support sample overlays.
Hardcoded values have been used:
- Resolution: 12-bit
- Gain: 1
- Reference: internal
- Acquisition time: default
Some nRF channels have been adjusted to include resolution as well.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This adds to the usual qemu_x86_64 and qemu_cortex_a53 to
the entries for Sys-T catalog message in sample.yaml.
As the Sys-T backend has been updated to support 64-bit
for catalog messages.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The BT tiny configuration has been removed some time ago,
but documentation has been still referencing it.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Recently OpenAMP introduced the possibility to set the sizes for TX and
RX buffers per created instance. Expose this also to Zephyr users by
using a DT property "zephyr,buffer-size".
For the sake of simplicity use the same DT property to set the buffer
size for both TX and RX buffers.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Provided sample support for Telink tlsr9518adk80d board.
Set CONFIG_BT_TINYCRYPT_ECC=n (supported by BLE controller).
Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
Set the TF-M profile type to none for TF-M integration samples.
If the default profile has been set to something else these samples may
fail.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Adjusted Bluetooth parameters that have an impact on MTU and DLE
negotiation during a connection.
Enabled the Packet Reassembly feature from mcumgr libraries in the SMP
Server sample with the Bluetooth transport configuration. This change
should increase the overall throughput of the DFU process over
Bluetooth.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This PR adds a soft off mode to the RT10xx Power Management API.
Additionally, it corrects the PM API function in rt10xx_power.c to
use the correct function prototype to be properly overridden.
Signed-off-by: Nickolas Lapp <nickolaslapp@gmail.com>
The ISO security implementation works by verifying
against the acl (bt_conn) sec_level field. The
bt_conn sec_level field is only available
if CONFIG_BT_SMP is enabled, so this commit
adds guards for all ISO security checks as well.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is a follow-up to commit f5ffd05e6b.
Since twister removes leading spaces from received lines before
further processing, the regular expression for checking the output
produced by the sample cannot contain such space. Also negative
values read from ADC channels need to be allowed.
For consistency, remove the leading space also in the actual string
printed by the sample.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This dependency it is not required since majoprity of platforms are
working with new pinctrl API. This drops the pinmux dependency.
Fixes#46091
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit fixes the stale reference to the devicetree
`clock0@82005000` node, which was changed in the commit
7b601b7f50.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
off_t is often unsigned long, which means printf needs to use %lx. Insert
a cast in case the value is unsigned int.
Signed-off-by: Keith Packard <keithp@keithp.com>
Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
As per 'Adding Secure Partition' in the TF-M documentation,
every secure partition must have a unique 32-bit partition ID.
If no value is provided, one will be auto-allocated by the
TF-M build system, but this can lead to unpredictable behaviour
in some cases. One example is key derivation where the partition
ID is used as part of the key derivation inputs. Different builds
can results in different PID values being assigned, resulting
in inconsistent key derivation output.
To avoid these problems, this commit sets a fixed PID as a
best pratice.
A value of 1000 has been set to place it within the
'PSA and user Partitions' range (256 - 2999) described in the
documentation.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Fix various board fixed-partition definitions where the devicetree cell
has been defined oddly, such as 9 nibbles (which makes no sense since
the cells are 32 bit) or 7 nibbles where all the others are 8.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The sample did not have defined pass condition and was failing
due to a timeout. Add harness: consol and an explicit regex matching
the sample's output so it can pass on a hw. In addition, a requirement
for a gpio_loopback fixture was added to the sample.yaml.
fixes: #45229
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The check did not properly check the info->flags as a bitfield,
and thus never decoded the data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Define the configuration through an overlay file
to run the sample on the nucleo_h743zi target board.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
It has been validated that the nucleo_h743zi board works correctly,
with '__nocache' buffers and data caches enabled, so this patch enables
support for the former.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Adds mps3_an547_ns to certain TF-M samples to improve
testing in CI by including the Arm Cortex-M55 platform.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Removes lpcxpresso55s69_ns from certain sample.yaml files due
to changes required for TF-M 1.6.0 not being added to the
upstream project before the 1.6.0 release.
The NXP SDK available for download from NXP contains the required
updates, but these will need to be committed to TF-M, then made
available in the Zephyr fork, at which point the yaml files here can
have the LPC added back.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Increases the scan and adv data sizes to better support
the extended advertising data and periodic advertising
data (BASE).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Clean up some of the board specific configuration files.
Removed all CONFIG_BT_CTLR* configs from the nRF5340
appcore conf files as that does not compile the controller.
Ensured that the ISO buffer in the controller for
nRF52840 can contain SDUs from all BAP LC3 minimum
requirements, as the controller does not yet
support segmentation of SDUs.
Also fixed a few bad configurations (broadcast sink not
enabling the sync support etc.).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add specific configuration and DTS overlay files for NUCLEO-H7A3ZI-Q
board to the littlefs example project. The second half of the SOC flash
is used as flash partition for littlefs.
Signed-off-by: Christoph Heller <chris@metanetics.de>
This commit changes the pointer type used in the philosophers demo to
`stack_data_t *` when stacks are used for synchronization purposes.
The previously used `void *` was causing AMO address-misaligned
exception on the HiFive Unleashed platform.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
On the stm32l073rz nucleo and stm32f091rc nucleo
boards, the DTS pwm-leds node is disabled, because
the output pin might conflict with SPI1.
It is necessary to enable the node in the overlay
to compile and run the sample.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Remove the explicit enable of Extended and Periodic
Advertising support in Controller, the feature is no
longer experimental in the Controller and is now enabled
by default when application uses them by enabling as
Host feature.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add a call to bt_iso_chan_get_info for each CIS in the sample
to ensure that we don't attempt to send any data on a CIS
that is RX only.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
integration platforms can't be filtered out, adapt tests so that those
platforms are always available for testing.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
integration platforms should not be in common section if we have
scenarios with different set of integration platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The lmp90100_evb sample included an implementation of double sqrt, and the
on_off_level_lighting_vnd_app sample included an implementation of float
sqrtf. Move that code into minimal libc instead of requiring applications
to hand-roll their own version.
Signed-off-by: Keith Packard <keithp@keithp.com>
The overlay for the nRF52840 DK board uses ADC controller child nodes
for specifying channel configurations and it shows how to configure
a channel in differential input mode, so it can serve as an example
of how to use these new possibilities. The overlay for the nRF51 DK
board shows how to use a specific ADC resolution (the default 12 bit
setting is not supported by nRF51 SoCs).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Allow specifying configuration of channels through child nodes of ADC
controllers. This way analog inputs can be specified for channels in
SoCs that require this and it is also possible, for example, to use
different gain or reference selections for particular channels.
This commit also removes a few former limitations of the sample: now
it is possible to use more than 2 channels and each channel can use
a different ADC controller. Also the ADC resolution to be used can be
specified through devicetree.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add two new Kconfigs: BT_ISO_CENTRAL and BT_ISO_PERIPHERAL
that is used to do central or peripheral only builds,
similar to the BT_CENTRAL or BT_PERIPHERAL Kconfigs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This add a new sample application to test and validate
the stm32 octospi driver on the NOR octo-flash present on
stm32 disco kits
There should be a special case to erase the complete flash.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Increase the heap size for RT1170 EVK to allocate the
display buffers for a 720x1280 display
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
mps2_an521 and mps3_an547 need yet more time with TFM 1.6 to pass their
tests. This change was recomended by RajKumar Kanagaraj. Thanks!
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Since the recent OpenThread update, OT needs more stack to initialize,
therefore bump the stack size in samples using OpenThread.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The overlay was accidentally pushed as part of another commit while
doing some pinctrl/pwm tests.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This is the same fix as the one introduced in 49520eea57 ("samples: nrf:
system_off: Fix force state usage") for nRF boards. Quoting original
commit:
The sample cannot spin in an infinity loop because the idle thread
will not run and consequently the forced state will not be used.
Without this fix, the system doesn't enter SOFT_OFF state:
*** Booting Zephyr OS build zephyr-v3.0.0-3495-ga456c5274614 ***
cc1352r1_launchxl system off demo
Busy-wait 5 s
Sleep 2000 us (IDLE)
Sleep 3 s (STANDBY)
Entering system off (SHUTDOWN); press BUTTON1 to restart
ERROR: System off failed
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Convert the can_mode enum to a bit field to prepare for future extensions
(CAN-FD mode, transmitter delay compensation, one-shot mode, 3-samples
mode, ...).
Rename the existing modes:
- CAN_NORMAL_MODE -> CAN_MODE_NORMAL
- CAN_SILENT_MODE -> CAN_MODE_LISTENONLY
- CAN_LOOPBACK_MODE -> CAN_MODE_LOOPBACK
These mode names align with the Linux naming for CAN control modes.
The old CAN_SILENT_LOOPBACK_MODE can be set with the bitmask
(CAN_MODE_LISTENONLY | CAN_MODE_LOOPBACK).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove ESP32 and ESP32S2 from not working samples
and tests. Reason for not working is not enough memory
space in RAM to execute it. This can be worked out as next steps.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
LCD display is connected to the I2C bus SoC bus in the development kit,
this sample guides the user on how to use the LCD display with I2C commands
Signed-off-by: Esteban Valverde <esteban.valverde.vega@intel.com>
The audio stream receive callback now contains a
recv_info struct, which contain crucial information
such as timestamps and packet validity.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The values represent an enum, and it makes sense for the
enum values to follow the enum type name, so an
_DIR_ infix was added to the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Many functions and struct fields had the directory/type
value, but named in different ways and stored in different ways.
This change updates all uses of it to use the same name
and type.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The enum bt_audio_pac_type does not fully
represent the what the value is used for.
The typical use of it is not for just published
audio capabilities (PAC), but rather describes the
type, or direction, of audio endpoints.
For the unicast client, the type/direction is
relative to the unicast server.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The goal of this commit is to update existing STM32 boards descriptions
to use these size "DT_SIZE" macros to enhance readability. To realize this
i used a python script, which will detect the STM32 Boards
/zephyr/board/arm, and then will update in the dts files the partition
description using "DT_SIZE_K" and "DT_SIZE_M" macros.
Check manually and modify in .overlay files in samples and tests.
Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
Linker files were not migrated with the new <zephyr/...> prefix. Note
that the conversion has been scripted, refer to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add pinmux settings for lpadc to LPCXpresso55s69 and LPCXpresso55s28
boards. Enable ADC driver sample for LPCXpresso55s69, to aid in testing
pinmux settings.
Fixes#45401
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
In bt_audio_unicast_group_create, bt_audio_unicast_group_add_streams
and bt_audio_unicast_group_remove_streams to use an array
of pointers, instead of an array of streams.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added chosen syntax in Device Tree to abstract the IPC device that is
used with the IPC service module in the Bluetooth HCI RPMsg driver.
Ported affected boards to declare this alias.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Cleaned up the IPC configuration for nRF5340 SoC in Device Tree. This
change fixes the (simple_bus_reg) warning about the missing or empty
reg/ranges property.
This is a follow-up to commit cf6a58d.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Update the sample to print the ISO information like flags,
sequence number and timestamp received in the ISO receive
callback.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:
```python
from pathlib import Path
import re
EXTENSIONS = ("c", "h", "cpp", "rst")
for p in Path(".").glob("samples/**/*"):
if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
continue
content = ""
with open(p) as f:
for line in f:
m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
if (m and
not m.group(2).startswith("zephyr/") and
(Path(".") / "include" / "zephyr" / m.group(2)).exists()):
content += (
m.group(1) +
"#include <zephyr/" + m.group(2) +">" +
m.group(3) + "\n"
)
else:
content += line
with open(p, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add sample code that demonstrate the usage for Nuvoton ADC Comparator
driver, this driver is available for NPCX microcontroller family,
this sample is supported on npcx9m6f_evb board.
Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
With LwM2M v1.1 SenML CBOR is preferred over SenML JSON.
TLV is on by default only with v1.0.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Extend sample to show how to use alternative approach of adding
subcommands using new APIs: SHELL_SUBCMD_SET_CREATE, SHELL_SUBCMD_ADD
and SHELL_SUBCMD_COND_ADD.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix Broadcast ISO and Synchronized Receiver project
configurations related to IPC use.
Relates to commit cf6a58d3f6 ("bluetooth: hci: rpmsg:
use ipc service library").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Previously non-secure request at the 6th run expected to return status
"-135 (PSA_ERROR_INVALID_ARGUMENT)" which is the expected status so
updating "if" condition on the non-secure side handles this expected
type error status from the secure side.
- update sample YAML harness config regex of Digest message as this gets
compared at the run of twister.
- Update the readme console logs.
Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
In order to be consistent with what is possible in Devicetree, always
take a period in nanoseconds. Other scales or units may be specified by
using, e.g., the PWM_MSEC() macros (all of them converting down to
nanoseconds). This change then deletes the "_nsec" and "_usec" versions
of the pwm_set call.
Note that this change limits the period to UINT32_MAX nanoseconds,
~4.3s. PWM is, in generali, used with periods below the second so it
should not be a problem.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The sample did not use PWM in a proper way: it relied on a PWM device
handle, but channel or flags were hardcoded in the code. This patch
changes the sample to use a local binding ("pwm-servo") where the `pwms`
property is defined. This allows to make use of pwm_dt_spec facilities,
reducing the overall sample complexity and making it more portable
without editing the source code. The custom binding also requires to
provide the minimum/maximum pulse width so that different servos can be
easily plugged in without the need to edit sources.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
When a memory domain is initialized, the z_libc_partition must be
included so that critical libc-related data can be accessed.
On ARM processors without TPIDRURO when THREAD_LOCAL_STORAGE is enabled,
this includes the TLS base pointer, which is used for several
thread-local variables in the kernel.
Signed-off-by: Keith Packard <keithp@keithp.com>
When active, z_libc_partition consumes an MPU region which leaves too
few for some MPU tests. Free up one by disabling HW stack protection.
Signed-off-by: Keith Packard <keithp@keithp.com>
Function uart_fifo_read() returns 'int' (it may return negative values
in error cases). Its return value is stored in the variable 'read' that
is, however, of type 'size_t'.
Change the type of the variable 'read' from 'size_t' to 'int' to
accomodate proper handling of uart_fifo_read() invocation.
Coverity-CID: 248408
Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
Makes possible to enable LwM2M protocol v1.1 features. Uses SenML JSON
as default content format.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
- add an overlay file for the bbc_microbit board with specification
of GPIO that should be used as the PWM output to buzzer
- update a PWM related macro in the microbit specific code to refer
to PWM channel instead of pin
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- add `channel-gpios` property with GPIO assignment for the used PWM
channel to the `sw_pwm` node
- replace ambiguous "pin 21" in the sample's README with "pin P19"
that uses notation from the official micro:bit documentation and
is consistent with this pin number within the edge_connector node
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- add `channel-gpios` property with GPIO assignments for PWM channels
to `sw_pwm` nodes
- update PWM related macros to refer to channels instead of pins
- remove no longer needed inclusion of boards/arm/bbc_microbit/board.h
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
At some recent point, directory <zephyr-root>/include was moved to
<zephyr-root>/include/zephyr. However, links from documentation to
Zephyr source on Github were not updated. Update them now.
Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
This extends the samples to build for C++ using the same code.
This shows MIPI Sys-T can work C++ too.
The change to main.c regarding to the struct log_msg_ids is
simply that the compiler errored out complaining the members
must be initialized the same order as the declaration.
Also C++ dislikes a string literal being assigned to char*,
so assign them to const char* instead.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Updates the sample.yaml file to exclude problem architectures
from this sample project. SYS-T does not support 64-bit or
big endian architectures. The posix arch is excluded as it
is generating numerous anomolous runtime messages because it
does have the means to determine when data resides in the
rodata section.
It also converts the list of allowed platforms to lists of
platforms to use for integration testing. This helps to increase
general testing coverage.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adding configurations for enabling this sample project on cavs
platforms. This patch also contains a fix to mipi_syst library
which resolves the memory alignment issue across different
architectures.
Fixes#43344
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fix spelling errors in assorted .rst files. The errors were found
using a tool called 'codespell'.
Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
Route printk()'s through logging subsystem. This is required
to get clean OS panics in log output. If this is not defined, e.g.
the stack backtrace is mixed with the Zephyr OS panic information.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.
Additionally, add a sample to make sure that the module builds. It can
be built via:
```
$ west build -b native_posix -p=always samples/application_development/chre
```
Signed-off-by: Yuval Peress <peress@google.com>
Documentation build for 2.7 was failing due to using only a single
character instead of double for showing a module name.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
Print whether or not the code is actually in usermode.
Fail the execution with an assertion if not the case.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Changes console blocks in hello_world and magic_wand tflite-micro
samples to Kconfig blocks to match content. Fixes typos in
some networking samples so that code blocks display instead
of being hidden. Fixes path to litex-vexriscv-tflite.resc.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Prior instructions were incomplete, included extra, unneeded ways to
build the app.
This should simplify the instructions.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Previously, you were required to set the image versions through the
CMake variables TFM_IMAGE_VERSION_{S,NS}. For better integration with
the rest of the zephyr build system, these are now KConfig variables
with the same name.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
This displays the secure firmware version before the nonsecure firmware
version at the beginning of boot.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Previously, the example was a scheleton. This patch
pushes firmware images with psa_fwu_write, and completes
the firmware update example.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
This commit adds a sample application demonstrating how to use
the PSA Firmware Update API from TF-M. It also enables the
`FIRMWARE_UPDATE` partition to be included at build time.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
example: <irq.h> -> <zephyr/irq.h>
Issue #41543
Signed-off-by: Yuval Peress <peress@google.com>
Add loopback mode config to the sample so that the code
can be tested without an actual CAN network, but wit a
single board.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This change augments the application object name change notification to
occur prior to the actual name change done by the OTS layer.
Notifying prior to the actual name change makes it possible to inform the
application of the current name of the object as well as the new name.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
Fix usage of integration_platforms. Do not set it when the board is
excluded using some other filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Samples should run on a board if they have the peripheral connected, in
this case, if any LED on the board is connected to a PWM output. A
shield could be used to demonstrate a sample on a board that doesn't
have the required peripheral. In this case, it was also unclear where
that "external LED" had to be connected, unless one checks where channel
1 for PWM1 is routed to. All board LEDs are connected to pins that
cannot be driven by PWM.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).
Also updated period to 20ms (reasonable value for a PWM-driven LED).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).
Also updated period to 20ms (reasonable value for a PWM-driven LED).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).
Also updated period to 20ms (reasonable value for a PWM-driven LED).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>