Commit graph

101035 commits

Author SHA1 Message Date
Benjamin Cabé
cfeaf0c731 doc: settings: properly use C domain for cross referencing API
Use :c:func: to properly reference C domain functions
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:43:02 -04:00
Joerg Hofrichter
1540bd7d49 samples: modules: nanopb: display buffer content of correct size
With commit ad242b9, the buffer size was made configurable. Hence, the
corresponding definition CONFIG_SAMPLE_BUFFER_SIZE has to be used when
filling and displaying the buffer.

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
2024-08-30 11:58:50 -04:00
Vinayak Kariappa Chettimada
be7445de04 tests: bsim: Bluetooth: central_hr_peripheral_hr for nrf54l15bsim
Enable central HR peripheral HR samples for nrf54l15bsim.
RealEncryption is BabbleSIM is not enabled as nRF54L port
in Zephyr Controller is not yet supported and the test is
also not using security (SMP pairing).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
32f07a5cb6 Revert "tests/bsim: Provisionally disable the nrf54l15 BT tests"
This reverts commit 3d729986e0.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
b505942897 Bluetooth: Controller: nrf54L15bsim: Use NRF_GRTC
Use NRF_GRTC in nrf54l15bsim board builds.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
125f39758d Bluetooth: Controller: nRF54Lx: Use SW_SWITCH_SINGLE_TIMER
Use SW_SWITCH_SINGLE_TIMER for nRF54Lx so that fast ramp
can be used, and hence support assymmetric PHYs in ACL
connections.

nRF54Lx radio domain does not have second timer instance
to efficiently implement software switch unless a second
time is used from a different power domain needed use of
PPIB for the double buffered switch timer compares.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
e642aa3513 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (4/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

Remove CMSIS interface use, was replaced with nrf_grtc,
nrf_dppic and nrf_ppib interface in previous commit.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
da6bd08df0 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (3/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
d5e75ce755 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (2/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

Remove CMSIS interface use, was replaced with nrf_grtc
interface in previous commit.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
24465ec160 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (1/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
f39c27bc95 Bluetooth: Controller: nRF54Lx: Review rework GRTC support
Review rework GRTC support for nRF54Lx SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
4fb293224c samples: Bluetooth: hci_uart: Add preliminary DF support for nrf54l15pdk
Add preliminary direction finding support building hci_uart
sample for nrf54l15pdk.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
10a466f31f Bluetooth: Controller: nRF54Lx: Support Radio fast ramp up
Add support for Radio fast ramp up for nRF54Lx SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
55813ad95b Bluetooth: Controller: nRF54Lx: Use NRF_GRTC for radio scheduling
Use NRF_GRTC, Global real-time counter, instead of NRF_RTC.

NRF_GRTC is present in a different power domain in the SoC.
Also, NRF_GRTC provide microsecond resolution timing units,
in the future use of NRF_TIMER for packet timer can also be
replaced.

Use of NRF_RTC would keep Radio power domain ON in addition
to already ON NRF_GRTC's power domain, hence switch to using
NRF_GRTC on nRF54Lx SoC to have lower power consumptions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
e998593c2e Bluetooth: Controller: nRF54Lx: Port for data whitening register use
nRF54Lx have updated Data Whitening register settings, add
implementation to correctly set them up.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
01d7a5bf13 Bluetooth: Controller: Ticker support for free running counter
Add ticker implementation support for free running counter
use.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
a947d6f635 Bluetooth: Controller: Add HAL_TICKER_TICKS_TO_US_64BIT define
Add HAL_TICKER_TICKS_TO_US_64BIT define, to return
microsecond value in 64-bits.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
ded2c74a97 Bluetooth: Controller: Remove redundant HAL_TICKER_CNTR_CLK_FREQ_HZ
Remove redundant HAL_TICKER_CNTR_CLK_FREQ_HZ define.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
55b7dba8ec Bluetooth: Controller: Refactor sw_switch hal interface use
Refactor sw_switch hal interface use and document why some
PPI/DPPI channel group related subscriptions are not
disabled explicitly.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
a7fff7445c Bluetooth: Controller: Fix ext conn create when using single timer
Fix Extended Connection Creation when using single timer
feature in the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
bcd28e0a86 Bluetooth: Controller: Fix sw switch single timer for spurious TXEN/RXEN
Fix software tIFS switching using single timer from
triggering spurious TXEN/RXEN if the first remainder is
shorter than the tIFS delay calculated in the sw_switch()
function.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
7fbf337e6f Bluetooth: Controller: Fix BT_CTLR_EARLY_ABORT_PREVIOUS_PREPARE depends
Fix BT_CTLR_EARLY_ABORT_PREVIOUS_PREPARE Kconfig depends on.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Marcin Wierzbicki
310570e712 tests: adc: Add overlay for UCANS32K1SIC
New file with ADC configuration for UCANS32K1SIC evb.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
bebabc775b samples: adc: Add overlay for UCANS32K1SIC
New file with ADC configuration for UCANS32K1SIC evb.
Add ucans32k1sic_s32k146 to platform_allow.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
a235230393 boards: nxp: twr_ke18f: add vref-mv value
Add vref value of 3300mV.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
da0d3726e2 boards: nxp: frdm_ke17z and frdm_ke17z512: add vref-mv value
Add vref value of 3300mV.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
0c93ac89c5 board: ucans32k1sic: Enable ADC on UCANS32K1SIC evb
Enable ADC on the UCANS32K1SIC

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
970638371c drivers: adc: adc_mcux_adc12: add API internal reference
Extend the adc_mcux_adc12 adc api to set the ref_internal to
a value of vref-mv property.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
71810a5306 drivers: adc: adc_mcux_adc12: set the vref as a property
Add the vref reference voltage in the DTS, so that the adc driver
can retrieve the value for conversion.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
53e7a9dd86 drivers: adc: adc_mcux_adc12: enable support for channel>=16 on S32K14X
Enable support for channels >= 16 on devices S32K146 and S32K148.
Channels >= 16 are encoded as 100000b..101111b in SC1[ADCH] field.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
eebaa2b270 soc: arm: nxp_s32: s32k1: add support for ADC
Add support for the Analog-to-Digital Converter (ADC).

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Richard Wheatley
cb20e865d6 drivers: adc: format ambiq adc driver
run clang-format on ambiq adc driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
725f084e09 tests: drivers: adc: adc_api: boards: add conf file
Add configuration file to adc_api test and adc sample

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
9a4091b02a boards: ambiq: add adc to apollo4p boards
Add adc to apollo4 plus boards

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
6dd54c8835 dts: arm: ambiq: add ambiq adc to dtsi file
Add Ambiq adc to apollo4 DTSI

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
8561d0285d drivers: adc: update ambiq adc driver
Update Ambiq adc driver to add apollo4
fixed typ of BUMBER to NUMBER
Move buffer size prio to configuring slots
and enabling the ADC
removed #if defined(CONFIG_PM_DEVICE_RUNTIME)

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Anas Nashif
d145db01b4 twister: setup soc/arch roots based on module settings
Get data for various roots from modules and do not hardcode location
when retrieving list of boards in testplan.

Fixes #71761

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-30 11:46:41 -04:00
Chris Ruehl
8a154da914 tests: build_all: sensors: add bmp180@94, i2c.dtsi
Add bmp180 test case to tests/drivers/build_all/sensor/i2c.dtsi

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Chris Ruehl
03c942132d Drivers: Bosch bmp180 dts bindings
Add the yaml files needed for the dts binding of the Bosch bmp180 sensor.

V2 Fixup
--------
yaml fixup for complient checks
merge bmp180-i2c.yaml and bmp180.yaml

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Chris Ruehl
db5091c9f4 Drivers: Add support for Bosch bmp180 sensor
Add driver support for Bosch bmp180 pressure sensor running on i2c bus.
It pushes the driver files to the bmp180 directory under
drivers/sensor/bosch. The driver implement the Sensor API
and support channel DIE_TEMP and PRESSURE.
Driver had been tested with the NRF5340DK.

V2 fixup
---------
Drivers: Bosch bmp180 fixups for PR v2
fix BMP180 in CMakeLists.txt
rename regControl to ctrlreg
simplify the logic in set_attribute
use BMP180_GET_CMD_TEMP_DELAY

Drivers: Bosch bmp180 use system byteorder macros
To aware of ENDIANESS use the macros from byteorders.h

Drivers: Bosch bmp180 comments added to #endif
Add a comment to the #endif /* CONFIG_FOO */

Drivers: Bosch bmp180 , fix twister run error
twister report an error related to using floor() with a float
fix this using floorf() function.

Drivers: Bosch bmp180, rework review v2
fix code style issues
simplify the structure for bus and i2c.
prepare to remove the empty bmp180_i2c.c

Drivers: Bosch bmp180, remove bmp180_i2c.c
bmp180: update CMakeList.txt remove bmp180_i2c.c
bmp180: remove unused variable

fixups for complient checks

replace homebrew bitshift with byteorder.h macro
sys_get_be16 and sys_get_be24
cleanup remove unused spi.h
change struct reg16/24 to uint8_t[]
remove channel AMBIENT_TEMP
bmp180/Kconfig add missing help text
fix indent issue in bmp180_pm_action
merge BMP180_CONFIG_I2C into BMP180_INST
Move DT_DRV_COMPAT out of the header file
drop LOG_DBG() from read calibration data
remove bus_io implementation and header cleanup
move headers and structs out from bmp180.h
fix typo in comment
apply clang format changes, only if not line lenght violation
fix indent code error after joined lines
conversion from Pa to kPh was wrong, fixed it
Remove default=n from Kconfig, it is the default.
Move the conversion ready test into a function (duplicate code)
and apply retry policy
parameter naming with indicate the usage
change BMP180_INST(inst) to clang format
fix int32_t overflow in convension formular
fix wrong devider in convension formula
move BSWAP_s16 BSWAP_u16 from .h to .c

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Johan Hedberg
c15957e753 Bluetooth: drivers: Add module blobs dependencies to Kconfig
Now that there is an actual Kconfig symbol generated for blobs presence,
take advantage of that and declare appropriate dependencies to it. Also add
helpful CMake output if the blobs are missing by taking advantage of the
zephyr_blobs_verify() CMake function.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Johan Hedberg
5562bb9c3a scripts: zephyr_module: Add Kconfig symbol for blobs presence
For any module that defines blobs, add a new Kconfig symbol to indicate
whether the blobs have been fetched or not. Example output for the
hal_silabs module:

   # (no blobs present)
  $ scripts/zephyr_module.py --kconfig-out=/dev/stdout \
    -m ../modules/hal/silabs
  menu "hal_silabs (../modules/hal/silabs)"
  osource "/Users/johedber/src/zephyr/modules/hal/silabs/zephyr/Kconfig"
  config ZEPHYR_HAL_SILABS_MODULE
  	bool
  	default y
  config ZEPHYR_HAL_SILABS_MODULE_BLOBS
  	bool
  endmenu
  $ west blobs fetch hal_silabs
   # (blob fetching output)
  $ scripts/zephyr_module.py --kconfig-out=/dev/stdout \
    -m ../modules/hal/silabs
  menu "hal_silabs (../modules/hal/silabs)"
  osource "/Users/johedber/src/zephyr/modules/hal/silabs/zephyr/Kconfig"
  config ZEPHYR_HAL_SILABS_MODULE
  	bool
  	default y
  	select TAINT_BLOBS

  config ZEPHYR_HAL_SILABS_MODULE_BLOBS
  	bool
  	default y
  endmenu

The generated output for modules which do not define blobs is not affected.

Having this additional symbol for blobs lets us specify Kconfig
dependencies for features which require the blobs to be present.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Bjarki Arge Andreasen
ee1e517ccf ipc: icmsg: configure PBUF RX rx_buffer using kconfig
The size of the rx_buffer used by icmsg.c mbox_callback_process()
is not MISRA compliant, being "dynamically" allocated on the stack.

This commit adds a kconfig to set the size of the read buffer and
asserts that it is large enough to read all received data.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-30 11:45:38 -04:00
Emil Gydesen
303d0b786f tests: Bluetooth: BAP: Add test to test invalid bcode
Add a babblesim test for testing the behavior when providing
an invalid broadcast code as the broadcast sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-30 11:44:05 -04:00
Pavel Vasilyev
1fa27888f4 bluetooth: mesh: Fix proxy client compilation
When building proxy client without proxy server, it fails to find
the `identity` field in the `struct bt_mesh_subnet_keys` because the
latter only compiles when Proxy server is enabled. It should be
possible to compile Proxy Client without Proxy server.

This commit compiles the field if any of GATT features is enabled.

Fixes #75914

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-08-30 11:43:51 -04:00
Alberto Escolar Piedras
5c17f51bda Bluetooth: Controller: Initialize BIG info RFU field
The BIG info new Framing Mode field was not initialiazed, so
random garbage was being sent to the air in this field.
For the controller this field is still RFU.
The spec specifies RFU fields must be initialiazed to
0. So let's do so to avoid sending invalid data,
and avoid having random data in the air which can cause
random differences in testcases.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:40 -04:00
Luca Burelli
f889c4e288 samples/llext/modules: sample.yaml fixes
Apply cleanups suggested by Anas in a Github discussion to the
sample.yaml file.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Luca Burelli
030c1c8308 samples/llext/modules: build hello_world as built-in by default
This commit changes the default value of CONFIG_HELLO_WORLD_MODE to 'y'
so that the hello_world function is compiled as a built-in part of the
Zephyr image by default. This is the simplest possible configuration,
that works for all architectures.

To build hello_world as an llext module, the user must either follow the
commands in the documentation or set CONFIG_HELLO_WORLD_MODE=m in the
project file along with additional architecture-specific settings that
may be required for proper LLEXT support on the target.
Leave a note in the prj.conf and sample.yaml files to remind the user.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Alberto Escolar Piedras
d112549140 manifest: Update bsim to version v2.3
Includes an updated libcrypto with new APIs
for CCM packet encryption/decryption.
Also some other components have got very minor updates.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:20 -04:00
Alberto Escolar Piedras
55f9d6965a manifest: Update nRF hw models to latest
Update the HW models module to:
da5f426e7f3aff192a93e5874146260d4dcd943e

Including the following:
* 6e70c2d hal: hack: Support also AAR, CCM & ECB for 54L
* da5f426 Tests for AAR, CCM & ECB
* 03b8461 54: Added AAR, CCM & ECB models
* 2ebcc88 Add EVDMA model
* 71913e3 54: Enable AAR hal build
* 0f3a04b BLECrypt_if: Add new interfacing for latest libCrypto

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:08 -04:00