Commit graph

10700 commits

Author SHA1 Message Date
Johan Hedberg
3063f18942 Bluetooth: Host: Remove unnecessary hci_driver.h includes
None of these files actually use anything from the hci_driver.h header
file.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-22 11:37:12 +01:00
Pieter De Gendt
f05deb1aa4 python: Format trivial files where only newlines were missing
Apply formatting on files that only needed adding newlines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-21 20:10:51 +01:00
Muhammad Waleed Badar
9a804572a3 samples: rtc: Generic RTC sample
This sample app set and read date/time from the Real-Time Clock.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2024-11-21 14:49:19 +01:00
Sebastian Głąb
f0eba33258 samples: boards: nordic: coresight_stm: Test STM dictionary mode
Extend STM logger test.
Use nrfutil trace to decode STM logs in dictionary mode.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-11-21 11:01:43 +00:00
Carles Cufi
21475774fc boards: nordic: nRF54L15DK: Add basic support for the L05 and L10 ICs
The nRF54L05 and nRF54L10 are identical to the nRF54L15 except for their
memory sizes. Add support for emulating those ICs on the nRF54L15DK.
This commit only adds support for the main application core. Support for
the FLPR core may be added later.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Emil Gydesen
7a72280d01 Bluetooth: HAS: Change select UTF8 to depends on
Change the select to a depends on for the Kconfig options
for HAS and HAS_CLIENT.

This is an effort to reduce the number of selects used by
LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
c4fbe38219 Bluetooth: BAP: Depend on BT_PER_ADV_SYNC instead of select
Change the select of BT_PER_ADV_SYNC and BT_EXT_ADV to
depends on. This is an effort to reduce the use of
select for Kconfig options.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
4c86a5cc8d Bluetooth: BAP: Depend on BT_PAC_{SNK,SRC} instead of select
Modify ASCS and BAP Broadcast sink to depend on the PAC options
instead of selecting them.

Since Kconfig does not support "depends on X if Y",
a select for PAC_{SRC,SNK} is used depending on
ASCS_ASE_{SRC,SNK}.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
c0f86011cb Bluetooth: BAP: Depend on BT_ISO_SYNC_RECEIVER instead of select
The BAP Kconfigs option now depends on
BT_ISO_BROADCASTER instead of selecting it.

This is an effort to reduce the use of select in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
d22c7b0cf2 Bluetooth: BAP: Depend on BT_ISO_BROADCASTER instead of select
The BAP_BROADCAST_SOURCE Kconfig option now depends on
BT_ISO_BROADCASTER instead of selecting it.

This is an effort to reduce the use of select in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
df6b5981bf Bluetooth: Audio: depends on GATT instead of select
Modify the Kconfig options to depend on the GATT
features rather than selecting them.

This is part of an effort to reduce the amount of
selects we use in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Federico Di Gregorio
1f5a1b50fa boards: opta: ADC support
A valid device tree configuration is provided for the ADCs of the 8 input
channels and the sample adc_dt works out of the box. Obviously this is
not the only possible configuration but it provides a good template for
further customization without the need to lookup the ADC GPIOs and
connections in the schematics.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Federico Di Gregorio
f8ab959d7e boards: opta: RS485 support
This set of changes enables the RS485 hardware connected to usart3 and
provides some overlays that allow for easily running the modbus
rtu_client and rtu_server samples on Opta.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Federico Di Gregorio
cf45ab85d2 boards: opta: ethernet reorganization
This set of changes reorganize the ethernet configuration by removing the
use a regulator to enable the PHY: the correct GPIO pin is set in code
only if the network has been configured via CONFIG_NET_L2_ETHERNET.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Valerio Setti
516886be1b mbedtls: MBEDTLS_ENTROPY_POLL_ZEPHYR default on if MBEDTLS_ENTROPY_C
As long as MBEDTLS_ENTROPY_C is enabled, Mbed TLS needs to
poll some entropy source to gather data that will then be
processed by CTR/HMAC-DRBG modules. This means that in most
of the cases, once MBEDTLS_ENTROPY_C is enabled then also
MBEDTLS_ENTROPY_POLL_ZEPHYR needs to be enabled. This was
done manually until now, as the long list of samples/tests
demonstrate.

This commit solves this dependency by defaulting
MBEDTLS_ENTROPY_POLL_ZEPHYR to on as soon as
MBEDTLS_ENTROPY_C is set. As a consequence, all manual
enablement of MBEDTLS_ENTROPY_POLL_ZEPHYR in samples/tests
are removed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Valerio Setti
08bd9c72bd mbedtls: use CSPRNG whenever possible as PSA random source
The main problem of MBEDTLS_PSA_CRYPTO_LEGACY_RNG is that it
brings in some legacy modules (entropy + ctr_drbg/hmac_drbg)
which means extra ROM/RAM footprint.
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG instead simply calls to the
CSPRNG which makes it definitely smaller.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Jakub Wasilewski
8e881959a4 boards: hifive_unmatched: add support for S7 and U74 targets
Add `hifive_unmatched//s7` (earlier selected by default, using
`hifive_unmatched`) and `hifive_unmatched//u74` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
2423c87d54 boards: hifive_unleashed: add support for E51 and U54 targets
Add `hifive_unleashed//e51` (earlier selected by default, using
`hifive_unleashed`) and `hifive_unleashed//u54` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Sergei Ovchinnikov
55c6a0eaa5 drivers: sensor: npm1300_charger: expose VBUS status
Add possibility to retrieve VBUS status of the nPM1300 charger through
its sensor APIs. Updated shields/npm1300_ek sample to use the new API.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2024-11-19 17:51:13 -05:00
Johann Fischer
1687e192b5 samples: usb: add new WebUSB sample
Add a WebUSB sample that uses the new USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-19 09:53:29 -05:00
Johann Fischer
2d90df407f samples: usb: add samples function to setup USB device only
Add a function similar to sample_usbd_init_device(), but one that does
not initialize the device. It allows the application to set additional
features, such as additional descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-19 09:53:29 -05:00
Rafał Kuźnia
e18410944e modules: hal_nordic: add NRFX_GPPI config
The nrfx_gppi module is an abstraction over nrfx_ppi and nrfx_dppi
drivers. It now has a Kconfig option that is separate from nrfx_dppi and
by default it enables all PPI/DPPI instances, if available.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Sylvio Alves
c7a592b3e0 soc: esp32c6: add Wi-Fi support
Enables Wi-Fi support.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-18 13:17:54 -05:00
Martin Stumpf
7c24bd8520 samples: drivers: display: adjust alpha handling
ARGB8888 values all had alpha '0x00' (=transparent).
Changed them to '0xFF' and added a transparency test patch in the middle
of the screen.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
86a126dba4 samples: modules: lvgl: fix integer overflow
`lv_task_handler()` returns a `uint32_t`, but `k_msleep` takes a
`int32_t`.

If no timer exists, `lv_task_handler()` returns `UINT32_MAX` to indicate
that we should wait forever. However, this gets auto-cast to `-1`,
indicating to `k_msleep` to not wait at all, creating a busy loop.

Hence, a clamping to `[0, INT32_MAX]` is required.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
3eae0201c8 samples: modules: lvgl: add screen_transparency sample
Adds a sample that renders the simple `hello world` LVGL demo
with a transparent background, to demonstrate ARGB8888 framebuffer
capabilities.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Jukka Rissanen
d178eb2908 net: stats: ipv4: pmtu: Add Path MTU Discovery statistics
Add information about PMTU related packets received/sent/dropped
for IPv4.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
026f88481d net: stats: ipv6: pmtu: Add Path MTU Discovery statistics
Add information about PMTU related packets received/sent/dropped
for IPv6.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Fin Maaß
fbea2ceba3 samples: net: cloud: aws_iot_mqtt: remove redundant kconfig
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR is on
by default, if the device supports that, so there is no need
to enable it explicit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 15:26:57 -05:00
Fin Maaß
3231b993ae samples: net: cloud: aws_iot_mqtt: use auto init
use auto init for networking, dhcp and sntp.
This simplifys the code of this sample by using the
auto init feature of the networking stack.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 15:26:57 -05:00
Andrej Butok
92273c5754 samples: smp_svr: add common sysbuild true
Adds sysbuild: true to the common section,
to build the project using sysbuild.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-11-16 15:25:03 -05:00
Chris Friedt
9504034733 sys: util: use BITS_PER_BYTE macro instead of the magic number 8
Obviously, everyone knows that there are 8 bits per byte, so
there isn't a lot of magic happening, per se, but it's also
helpful to clearly denote where the magic number 8 is referring
to the number of bits in a byte.

Occasionally, 8 will refer to a field size or offset in a
structure, MMR, or word. Occasionally, the number 8 will refer
to the number of bytes in a 64-bit value (which should probably
be replaced with `sizeof(uint64_t)`).

For converting bits to bytes, or vice-versa, let's use
`BITS_PER_BYTE` for clarity (or other appropriate `BITS_PER_*`
macros).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-16 15:22:35 -05:00
Yishai Jaffe
b44ab89c4c samples: sensor: die temperature polling: remove redundant configuration
rpi_pico.conf only adds CONFIG_ADC=y which already exists in the
prj.conf so it's redundant and can be removed.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-11-16 15:20:24 -05:00
Furkan Akkiz
9bb46e6417 samples: drivers: Add MAX78002EVKIT sample overlay files
Enable counter/alarm sample for MAX780002EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Kenneth Witham
e19838d157 net: mqtt-sn: Update MQTT-SN Publisher Sample with Gateway Discovery
Fixes: #78010
This commit adds the "Gateway Advertisement and Discovery" process
to the MQTT-SN Publisher Sample application.

Signed-off-by: Kenneth Witham <kennywitham4@gmail.com>
2024-11-16 15:08:27 -05:00
Bjarki Arge Andreasen
9df88e62fc samples: boards: nordic: add nrf_sys_event sample
Add sample for nrf system events.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:08:11 -05:00
Olivier Lesage
fc8d9425c1 bluetooth: samples: Add samples showing basic channel sounding features
These samples demonstrate how to use the bluetooth 6.0 channel
sounding APIs. A basic distance estimation algorithm is included.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-16 15:07:20 -05:00
Francois Ramu
abfd712cec samples: boards: stm32 power lptim adjusted to 15 seconds
Gives an example where the timeout value is 15seconds,
the prescaler of 8 can let the LPTIM count from 0 to 16 seconds
with LSE

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-16 15:05:26 -05:00
Emil Gydesen
dc6630d5f5 samples: Bluetooth: PBP: Source: Fix advertising data
The sample had a few off-by-ones in the code, which caused access
to invalid data.

Fixed by setting the right buffer sizes and the right AD length
fields.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:56:30 -05:00
Emil Gydesen
8703381764 Bluetooth: Host: Add conversion macros from ms to various units
Add conversion macros from milliseconds to various units.
The purpose of these macros is to make it more clear/easier
for users to set and read values using milliseconds rather
than the various BT units which may be in 0.625, 1.25 or 10ms
units.

This is especially useful when comparing related values using
different units, such as advertising interval (0.625ms units)
and periodic advertising interval units (1.25ms units).

Users will have to be aware that these macros can provide slightly
different values than what is provided, if the provided values
do not match the units.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:06:03 -05:00
romain pelletant
ae0c1b72cf lorawan: add devicetime request support
Add devicetime request support.
Update lorawan sample
Related to Issue #55072

Co-authored-by: Jan Kowalewski <jkowalewski@cthings.co>

Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-11-16 14:03:36 -05:00
romain pelletant
866905fd6a lorawan: change downlink callback
Change downlink callback to transport data using flags.
Related to Issue #55072

Co-authored-by: Jan Kowalewski <jkowalewski@cthings.co>

Signed-off-by: romain pelletant <romainp@kickmaker.net>
Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-11-16 14:03:36 -05:00
Steve Boylan
d0aced304b drivers: spi: RPi Pico PIO SPI code size and byte order.
Use minimized PIO code for 3-wire operation.

Input and output buffers are conventionally stored in bus byte order.
For 16 and 32 bit transfers, this is effectively big-endian, so
txbuf and rxbuf need to be read as such.  Those pointers also need
to be declared uint8_t * instead of void *.
In addition, tx_count and rx_count are based on dts, and refer to
whole transfers (8, 16, or 32 bits), not bytes.

Added rpi_pico.overlay to samples/sensor/magn_polling to demonstrate
32-bit word size, and updated the README.rst to make it independent
of the specific sensor.

Clean up compliance check failures.
Fix typos.
Synchronize 3-wire TX and RX cycles.
Simplify state machine synchronization
Minimize SPI bus delay time in 3-wire mode
Move clock delay to PIO code and remove k_sleep

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2024-11-16 14:00:16 -05:00
Thomas Stranger
e6664e38ba samples: sensor: ds18b20: updates to reflect analog maxim acquisition
Links and the manufacturer name are updated from maxim to analog.

After the acquisition of Maxim Integrated the documentation
of these devices has been moved to the analog.com website.
Redirects exist, so they are not broken yet,
but we should not rely on that.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-11-16 13:51:38 -05:00
Jukka Rissanen
2188387dd3 samples: net: mdns_responder: Increase interface name len for VLAN
In this sample, VLAN has longer interface name so increase it to max.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:51:27 -05:00
Marcin Niestroj
79bc3d1de5 samples: dap: drop 'sample.dap.bulk.nrf'
'nrf52840dk/nrf52840' is already listed under "generic" 'sample.dap.bulk',
so keeping 'sample.dap.bulk.nrf' has no value. The only difference is
dependency on 'gpio' instead of 'arduino_gpio', but
'nrf52840dk_nrf52840.overlay' references arduino header gpios only.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-11-16 13:38:07 -05:00
Martin Stumpf
2e0687cfd2 generic: add frame_incomplete where missing
The newly introduced `frame_incomplete` flag of
`display_buffer_descriptor` needed to be added at several places to
avoid uninitialized memory.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-16 13:35:17 -05:00
Marek Matej
a8ab8b49f2 samples: drivers: IPM fixes
Updates and fixes to support IPM sample on ESP32:

- fix IPM sample code for APPCPU and PROCPU
- align with memory layout, add flash awarenes
- shell commands to stop/start APPCPU
- reorganize overlays

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Daniel DeGrasse
fc3ebac704 samples: drivers: display: make platform names fully qualified
Twister's extra arguments feature only works correctly if the fully
qualified platform name is given, which was not the case. Make all
platform names for the shield testcase fully qualified to resolve this.

Fixes #80876

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-08 11:35:58 -06:00
Daniel DeGrasse
d565f6e62a samples: drivers: display: remove lpc54114 from shield test
LPC54114 does not define arduino_header nodelabel, so it cannot be
supported by the shield test within the display sample. Replace with
mimxrt1010_evk, which is supported.

Fixes #80876

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-08 11:35:58 -06:00