Commit graph

99,250 commits

Author SHA1 Message Date
Mike J. Chen
894503c758 nvs: improve nvs_flash_cmp_const()
Replace the use of a memcmp of a temp buffer filled with
the comparison value with a direct comparison of
the read buffer contents.

Improves speed of the function (no more memset() call)
and reduces stack usage.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-03-05 10:55:40 +01:00
Cong Nguyen Huu
46d6e2e099 nxp_s32_canxl: use RTD API instead the current can_nxp_s32_abort_msg() API
On HAL RTD version 1.0.0, there is available Canexcel_Ip_DeactivateMD()
API that have similar capabilities as can_nxp_s32_abort_msg() API,
can use to instead.
Remove the reg grp_ctrl and reg base_dsc_ctrl that unused
after implementation this.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-03-05 10:54:50 +01:00
Glenn Andrews
3203bd660c Lib: SMF: Update index.rst
Incorporated changes requested by @keith-zephyr:
1. Grammar fix
2. Make explicit that transition to self in super-states is not supported

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-04 22:16:40 +01:00
Glenn Andrews
52453116b5 Lib: SMF: Add Doxygen commands.
Added Doxygen markup.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-04 22:16:40 +01:00
Glenn Andrews
52b0246964 Lib: SMF: Fix smf_set_terminate function typo.
Fixed where `smf_set_terminate` was written `smf_terminate`

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-04 22:16:40 +01:00
Glenn Andrews
0569809c80 Lib: SMF: Add initial transition and smf_set_handled()
Brings SMF framework closer into alignment with accepted Hierarchical State
Machine operation by:
1. Allowing 'programming by difference' by having some child states handle
   events and prevent propagation up to the parent run actions while others
   propagate events up to a common handler in a parent state.
2. Optionally allow initial transitions within a parent state to determine
   the most nested child state to transition to.
3. Adding a test case for `CONFIG_SMF_INITIAL_TRANSITION` and
   `smf_set_handled()`
4. Updating documentation for the new API (and fixing some references)

There was discussion in https://github.com/zephyrproject-rtos/zephyr/issues/55344
about not making the initial transition a Kconfig option, but I'm not sure
of any way else of doing it without permanently adding a pointer to each
`smf_state` entry, which is a problem for resource-constrained devices.

This does not fix https://github.com/zephyrproject-rtos/zephyr/issues/66341
but documentation has been updated to warn users of the issue.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-04 22:16:40 +01:00
Jan Bylicki
112bcb229c soc/arm/renesas_rzt2m: set default System Clock Control register values
Introduced changes to set the default values
for clock control registers

Signed-off-by: Jan Bylicki <jbylicki@antmicro.com>
2024-03-04 22:14:48 +01:00
Guillaume Gautier
cfa7e38378 samples: boards: stm32: pm: s2ram: enable standby mode
Add Standby mode to the overlay since here we want to test Suspend to RAM.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-04 22:14:11 +01:00
Guillaume Gautier
f1bfbb0627 dts: arm: st: wba: do not enable standby pm mode
Do not enable Standby low-power mode by default since the associated
Kconfig PM_S2RAM is disabled by default. Otherwise we could enter an
unsupported low-power state.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-04 22:14:11 +01:00
Aytürk Düzen
ec2e8aaddf tests: bluetooth: tester: add nrf54l15 configs
Added:
nrf545pdk_nrf5415_cpuapp.overlay: Choose uart20 hwfc 115200
nrf54l15pdk_nrf54l15_cpuapp.conf

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-03-04 22:13:37 +01:00
Tomi Fontanilles
7f9ed8695c samples: net: cellular_modem: add nRF9160 DK's nRF52840
The added configuration files allow the sample to be run
on the nRF52840 present on the nRF9160 DK with the nRF9160
(running SLM) being the modem and communication happening
through pins that are routed internally between the two.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-04 22:13:14 +01:00
Tomi Fontanilles
8473c54035 samples: net: cellular_modem: small fixes/improvements
- A small delay is added after the post-restart L4_CONNECTED event
  is received to prevent trying to send packets too quickly. Otherwise
  the first packet would not get sent and the sample would hang on recv().
- Some logs and function parameters are fixed.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-04 22:13:14 +01:00
Tomi Fontanilles
62d84fb322 drivers: modem_cellular: fine tune nRF91's shutdown_time
A shutdown lasting more than 5 seconds was experienced.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-04 22:13:14 +01:00
Tomi Fontanilles
3813faa302 modem: backends: uart_async: log the number of bytes dropped
When a receive buffer overrun happens.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-04 22:13:14 +01:00
Ioannis Karachalios
abc07d82e5 boards: da1469x_dk_pro: Update board's default Kconfig
Add default LVGL Kconfig for rounder cb.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-03-04 22:12:54 +01:00
Ioannis Karachalios
fce35569b8 modules: lvgl: Add support for frame rounder callback
Add support for LVGL rounder callback function. Sometimes,
either the underlying display controller and/or the LCD host
controller might impose restrictions on frame resolution.
For instance, the E1394AA65A display model should impose that
either axis of a frame be multiple of 2 pixels or the Renesas
LCD controller of the DA1469x SoC, should impose that the
stride value, number of bytes between consecutive frame lines,
be multiple of 4 bytes.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-03-04 22:12:54 +01:00
Jonathon Penix
9fc9eb5ddb cmake: Set memusage property for lld
lld gained support for the --print-memory-usage flag somewhat recently
(May 2023). Associate this flag with the memusage property when building
with lld, similar to what is done for GNU ld.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-03-04 22:12:15 +01:00
Fabio Baltieri
7d676c2331 input: pat912x: add a bunch of settings
Add devicetree based settings for resolution, axis inversion and sleep
mode enable. Keep the resolution setting in its own function so it can
be called by the application again in runtime if needed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-04 22:10:58 +01:00
Anas Nashif
a14ba6a253 intel_adsp: do not use SOC_TOOLCHAIN_NAME for include path
SOC_TOOLCHAIN_NAME was used instead of the SoC name for setting include
path, so all SoCs were using the same path. Originally this was relying
on SoC (before hwmv2), so reverting back to using the SoC name instead
and renaming directories as well.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-04 20:07:56 +01:00
Anas Nashif
e2f3912c5a x86: revert removing soc.h from atom soc
This was part of the mega hwmv2 commit. Looks like hpet drivers heavily
relies on soc.h. Reverting this for now while we look for a proper fix
and remove reliance on soc.h for drivers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-04 20:07:30 +01:00
Anas Nashif
668f6d87ec twister: tests: fix tests by mocking platform attributes
We were missing mocking for normalized_name and board detection was not
working correctly after moving to hwmv2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-04 14:05:22 -05:00
Anas Nashif
f1f6b72c76 ci: run twister/west tests on collab/release branches
Make sure we run twister and west unit tests on branches, to avoid
breakage when introducing changes to those branches.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-04 14:05:22 -05:00
Declan Snyder
eb1f5fec0c soc: nxp: Fix issues caught in CI from HWMv2 port
During HWMv2 porting there was some build fails missed from
typos in the RT1064 and RT11XX series, fix these.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-04 14:04:58 -05:00
Jamie McCrae
6f6480c90a maintainers: Update Kconfig paths
Updates the Kconfig path to include 2 missed files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-04 13:16:33 -05:00
Kevin Townsend
cbbd79a8c9 maintainers: Update Arm maintainer and collabs
Updates the maintainer for Arm and cleans up the collab list.

Signed-off-by: Kevin Townsend <kevin.townsend@analog.com>
2024-03-04 13:15:55 -05:00
Jukka Rissanen
4c8fafdf35 MAINTAINERS: Add pdgendt as networking collaborator
Adding Pieter De Gendt (pdgendt) as a collaborator to the
networking subsystem.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-04 17:04:24 +01:00
Yong Cong Sin
64f18bd554 MAINTAINERS: add myself as riscv collaborator
specifically for the intc_plic.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-03-04 17:04:07 +01:00
Gerard Marull-Paretas
148e6f0935 snippets: nordic-ppr-ram: fix board identifier
Missed conversion to HWMv2.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-04 17:03:47 +01:00
Torsten Rasmussen
e2ff2a88ba sysbuild: include HWMv2 Kconfig in sysbuild
Including HWMv2 Kconfig in sysbuild allows sysbuild to introduce
configuration options or defaults based on selected board and SoC.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-03-04 15:27:09 +00:00
Tomi Fontanilles
1d4121d97b doc: porting: HW model: fix an issue link
It pointed to the wrong issue.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-04 15:04:49 +01:00
Christopher Radzik
5046229bb9 drivers: clock_control: Fix STM32H5 MCO2 support
Add STM32H5 to the list of dependencies for CLOCK_STM32_MCO2_DIV.

Signed-off-by: Christopher Radzik <cradzik@fedsig.com>
2024-03-04 14:25:50 +01:00
Fabio Baltieri
ad9f2c599b input: kbd_matrix: skip column with empty mask
The active key mask can be used for supporting multiple keyboard layouts
with a single firmware. A possible use case is to support keyboard with
or without a numpad, in which case an entire set of columns may be
missing. Add a check to detect this condition and skip scanning that
column entirely if no keys are defined in it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-04 14:09:08 +01:00
Jakub Rzeszutko
1261745b2c shell: fix shell_stop command
Added missing condition to check if log backend is configured before
calling the function: z_shell_log_backend_disable. Without this, in some
configurations, a compilation error appeared due to calling a
non-existent function.

Fixes: #69555

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2024-03-04 14:08:04 +01:00
Lyle Zhu
5bd03fd41b Bluetooth: HFP: Fix session pointer invalid issue
The dlc->session is invalid in the callback
hfp_hf_disconnected. The behavior of obtaining
an ACL connection handle through an invalid
pointer is unknown.

Add a field "struct bt_conn *acl" to "struct
bt_hfp_hf". Save acl connect handle to "struct
bt_hfp_hf::acl" in function bt_hfp_hf_accept.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-03-04 14:07:22 +01:00
Mykyta Poturai
63d28e56f9 fs: explicitly initialize fs_file_t and fs_dir_t
C++ compilers forbid usage of compound literals with -Wpedantic enabled.
They also forbid the usage of designated initializers for standards
lower than c++20.
So switch to explicit initialization, that would not make compilers
angry at us.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-03-04 14:06:53 +01:00
Parthiban Nallathambi
f764763f00 samples: littlefs: add qspi nodes for rak5010_nrf52840
add qspi nodes with size of 64MB to LFS with automount.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-03-04 14:05:45 +01:00
Parthiban Nallathambi
9ae0dbc275 boards: arm: rak5010_nrf52840: fix qspi settings
fix QSPI NOR flash is25wp064a input page programming to 32h
as 38h isn't functional. Also adjust the frequency to max
possible value from nRF52 as 32MHz as the flash supports upto
133MHz.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-03-04 14:05:45 +01:00
Emil Gydesen
55bd06b03e tests: bsim: Bluetooth: Add bcast validation of bt_bap_ep_get_info
The broadcast sink and broadcast source will now use and verify
the info returned by bt_bap_ep_get_info.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-04 14:05:07 +01:00
Emil Gydesen
6976ad82ea Bluetooth: BAP: Add can_recv to bt_bap_ep_info
Similar to the can_send, the can_recv field indicates whether
or not this endpoint can receive data.

This commit also slightly refactors and optimized how the
can_send field is set.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-04 14:05:07 +01:00
Pavel Vasilyev
23049346e0 Bluetooth: Mesh: Fix dev key selection in SAR Cfg Client
For dev key encrypiton, BT_MESH_KEY_DEV_REMOTE should be used instead of
BT_MESH_KEY_DEV regardless of whether the destination is a local element
or remote.

BT_MESH_MSG_CTX_INIT_DEV macro selects correct key.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-03-04 14:03:09 +01:00
Krzysztof Chruściński
4d6bce34f7 tests: logging: log_api: Validate CONFIG_LOG_MSG_APPEND_RO_STRING_LOC
Extended test to validate that RO string locations are appended to
the cbprintf package for a log message if Kconfig option is enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-04 14:01:55 +01:00
Krzysztof Chruściński
44e0a64a90 logging: Fix support for CONFIG_LOG_MSG_APPEND_RO_STRING_LOC
There is an Kconfig option which results in RO string locations
being appended to the cbprintf package of a log message. Option was
not correctly handled, especially optimized API which was recently
added did not support that. Restoring support.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-04 14:01:55 +01:00
Alberto Escolar Piedras
9aec7af1c5 Bluetooth: Controller: Build hci_vendor.c also for simulation
The FICR is also modelled in simulation, but changing this
conditional compile was forgotten, so it was only being
built for real HW.
A test had provided its own version of this function so it would
avoid a runtime warning due to the lack of static address. But
this needs to be removed as it conflicts with the function
provided now always by the nordic controller SW.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-04 12:14:15 +00:00
Fabio Baltieri
12d89c65be Bluetooth: Controller: re-add missing hci_vendor.c reference
Move the nordic and openisa vendor file under ll_sw and add them back to
the list when building for nRF platforms, this was inadvertently removed
in

7bd2804c24 Bluetooth: Controller: Build vendor LLL as library

and is currently causing a:

<wrn> bt_id: No static addresses stored in controller

and random address on nRF devices.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-03-04 12:14:15 +00:00
Sebastian Bøe
a24238e9f9 boards: nrf54l15pdk_nrf54l15 support west attach
Add CMake code that fixes west attach on nrf54l15pdk_nrf54l15.

I don't know why this fixes west attach as this is cargo cult code.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-03-04 12:46:10 +01:00
Carles Cufi
ca769441d0 doc: porting: Add a section on the new hardware model
The current board porting guide explains the new hardware model without
making any references to the previous one. Add a new section that
explains the rationale behind the transition as well as adding important
bits of information for users that need to convert their boards.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-03-04 12:05:07 +01:00
David Leach
c53c4e3b43 soc: nxp: fix duplicate SOC_MIMX8MP definition
SOC_MIMX8MP defined twice in file

Signed-off-by: David Leach <david.leach@nxp.com>
2024-03-04 10:40:48 +01:00
Anas Nashif
72a17b6d88 ci: fix doc workflow on schedule
Build phase was skipped, we were checking for file changes which will
not have any results on a scheduled event.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-04 12:42:23 +09:00
Francois Ramu
95084e53e0 samples: drivers: watchdog testing on stm32c031 nucleo board
Add the nucleo_c031c6 target to run the samples/drivers/watchdog
for iwdg and wwdg on the stm32c0 serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-03-03 19:00:18 +01:00
Declan Snyder
ab48eae508 MAINTAINERS: Add decsny to ADC collaborator
Add myself as ADC collaborator to facilitate the PRs

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-03 19:00:11 +01:00