Commit graph

74822 commits

Author SHA1 Message Date
Chris Friedt
ac3efe70cd net: sockets: socketpair: header fixups
* include `<zephyr/posix/fcntl.h>` instead of `<fcntl.h>`
* drop unused logging header and module declaration
* reorder headers alphabetically

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Chris Friedt
db08c515c8 samples: net: socketpair: rename to main.c for consistence
The source file for most single-file sample apps is usually
`main.c`. Rename this file to be consistent with other
samples.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Chris Friedt
189d8b8a5e samples: net: socketpair: clean up sample app
* use `read()` instead of `recv()`
* use `write()` instead of `send()`
* use `CONFIG_POSIX_API` and drop `<zephyr/posix/..>` prefix
* use `perror()`
* fix `Makefile.posix` to use `CC` instead of `CXX`
* fix race condition which caused an unhandled EOF
  and infinite loop, by adding a readback / echo
* Updated the docs to reflect the expected stdout
* Improve doc clarity

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Maciej Zagrabski
7ca8accdc6 drivers: flash: fix uninitialised layout_size
Requesting page layout triggers filling bank array
only once, and returns pre-filled array on consequential calls.
But ignores array size.

Remember size of this array as well.

Fixes #54563

Signed-off-by: Maciej Zagrabski <mzi@trackunit.com>
2023-02-08 19:01:32 +09:00
Francois Ramu
a4637c5e52 boards: arm: stm32g431 nucleo has LPTIM1 peripheral clock config
Give the LPTIM1 peripheral clock configuration for the LPTIM1
instance on the nucleo_g431rb board. The LSE is enabled on the target
board and the SYS_CLOCK_TICKS_PER_SEC is adjusted.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-08 19:01:13 +09:00
TOKITA Hiroshi
0c5286dee6 Revert "boards: arm: rpi_pico: Enable MPU defaultly"
This reverts commit 61f89b7b18.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-02-08 10:57:53 +01:00
Declan Snyder
0744e42e22 drivers: disk: Decouple SDMMC and MMC Kconfigs
MMC was using SDMMC kconfigs to build disk driver.
This is incorrect, MMC and SDMMC should not be sharing
Kconfigs. Split the drivers/disk/Kconfig.sdmmc into
drivers/disk/Kconfig.mmc and drivers/disk/Kconfig.sdmmc.

Also update disk tests to account for new MMC Kconfigs.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-02-08 10:18:13 +01:00
Declan Snyder
bcd13af168 tests: drivers: disk: Update outdated prj.conf
The proj.conf for these two tests was unconditionally
selecting SDMMC disk drivers which is incorrect now that
there are DT macros that are used to select these Kconfigs.

This also allows the test to be used for other disk protocols
such as MMC, as before this change, SDMMC would still be selected
and cause errors at runtime.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-02-08 10:18:13 +01:00
Andrzej Głąbek
e60af79268 kernel: timer: Eliminate a race condition in expiration handling
When a timer is restarted from a high priority interrupt, it may
happen that the timer is re-added to the timeout list right after
it is removed from that list prior to execution of its expiration
handler but before that execution actually occurs. This leads to
an assertion failure reported for `z_add_timeout()` because then
that function, called from `z_timer_expiration_handler()` for
periodic timers, turns out to be adding a timeout that is already
added to the timeout list.
This commit detects such situation in `z_timer_expiration_handler()`
and makes that function exit immediately when that occurs (as the
timer was restared, its expiration handler should not be executed).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-02-08 10:17:56 +01:00
Andrey Borisovich
802600da7b scripts: twister: west twister error codes match twister direct call
This commit fixes #54492 where return code 1 is returned
when twister tests fail when twister is called directly and
return code 0 in similar scenario but twister is invoked using
west.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-02-07 09:22:34 -08:00
Daniel DeGrasse
83d5ed5825 docs: kconfig: restore appearance of kconfig search
Restore appearance of kconfig search, with rounded corners and
black background. This should resolve visibility issues encountered
on some browsers when running in dark mode

Fixes #53568

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-07 18:22:06 +01:00
Anas Nashif
0e0f878ddc picolibc: picolibc support still not complete with many toolchains
Clang support still work in progress in zephyr. So for now enable only
on gcc based toolchains.

We should enable this back for more toolchains once we have full clang
support and are able to verify.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-07 18:16:10 +01:00
Wolfgang Puffitsch
c8c81d28b7 Bluetooth: controller: Only allow supported feature bits to be set by host
Redefine mask of host-controlled feature bits to include only features
that are supported by the controller. This fixes a conformance test
failure where setting an unsupported host-controlled feature bit was
not rejected as it should.

Set the Connected Isochronous Streams (Host Support) bit from the host
only if unicast support is configured to avoid failures in
broadcast-only configurations.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2023-02-08 01:16:10 +09:00
Erwan Gouriou
36ffed2a89 tests: drivers: flash: _ns target test case should be build only
Flash test can't be tested automatically on (at least some) _ns targets
by CI.
Set a dedicated test scenario for _ns targets in build_only.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-02-08 01:14:38 +09:00
Emil Gydesen
bebb98efb1 tests: Bluetooth: Unicast client BSIM used group size as stream_cnt
Instead of setting the stream_cnt based on the number
of streams configurer, we use the number of streams actually
added to the group, and then configure that amount.

This should ensure that we do not try to configure any
streams that we have not already added to the group.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-08 01:11:03 +09:00
Emil Gydesen
b18fcdbade tests: Bluetooth: Expand unicast audio BSIM tests
Expands the unicast audio babblesim tests up until
the start procedure (which is not yet supported by the
babblesim). This increases the test coverage of the unicast
implemetations.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-08 01:11:03 +09:00
Emil Gydesen
54d31d0a13 tests: Bluetooth: Unicast client remove CIG guards
The unicast client will now actually create the CIG in the
test regardless of the `CONFIG_BT_CTLR_CENTRAL_ISO` value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-08 01:11:03 +09:00
Gustavo Romero
7ab955ec1f tracing: scripts: Fix spelling
Fix the spelling of Babeltrace library in the warning message displayed
when such a library can not be imported.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2023-02-08 01:09:31 +09:00
Tom Burdick
86af9bcce1 spi: SAM add spin lock around all tx/rx/txrx funcs
The fast tx/rx/txrx functions will leave the SPI bus in an
inoperable state if interrupted, potentially spinning forever waiting on
some data. Wrapping these operations in what amounts to a critical section
using spin locks to avoid the issue.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-02-08 01:08:59 +09:00
Daniel DeGrasse
bcee4ed34e samples: drivers: adc: add support for side b channel to RT685 EVK
Add support for CH0B to RT685 EVK, to demonstrate LPADC side B channel
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Daniel DeGrasse
966b88eaa9 samples: drivers: adc: add support for side B channel on LPCXpresso55s69
Add support for CH0B on LPC55s69 EVK, to demonstrate side B support in
LPADC driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Daniel DeGrasse
f7d9ea889b drivers: adc: support side B channels in LPADC driver
Add support for side B channels in MCUX LPADC driver. Given
that no instances of the IP block have more than 8 a side channels,
use channel numbers over 8 to indicate side B channel is desired.

Fixes #51076

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Henrik Brix Andersen
5acdb13155 doc: release-notes: add CAN release notes for v3.3.0
Add CAN related release notes for Zephyr v3.3.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-02-08 01:06:45 +09:00
Maciej Perkowski
40a21f61c2 bugfix: twister: Fix interaction between quarantine integration mode
Tests under quarantine are not treated as errors in the integration
mode. However --quarantine-verify argument allowing to execute just
test under quarantine and skipping others was not considered in
relation to integration mode. Those skips are wrongly threated as
errors. This commit fix this relation and makes thoses skips not
turned to errors.

fixes: #54516

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-02-08 01:06:30 +09:00
Joakim Andersson
36421f2efc modules: trusted-firmware-m: Remove SFN limitation of platform partition
The TF-M platform partition has now been ported to PSA firmware
framework 1.1 and can now be used together with the SFN model.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-07 14:27:03 +01:00
Joakim Andersson
df12df354c modules: trusted-firmware-m: Remove setting of removed cmake option
Remove setting of the TFM_LIB_MODEL option for IPC and SFN models.
This option is removed together with the library model.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-07 14:27:03 +01:00
Joakim Andersson
5c97bb5ecd modules: trusted-firmware-m: Fix TF-M floating point options
Fix setting of TF-M floating point options when floating point is
enabled in the application.
FP design in Armv8.0-M architecture requires consistent FP ABI types
between SPE and NSPE.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-07 14:27:03 +01:00
Andrzej Głąbek
29d7c90779 tests: Align zephyr,psa-crypto-rng node names with those used by SoCs
This is a follow-up to commit 9951971aee.

Align names of "zephyr,psa-crypto-rng" compatible nodes used in tests
(crypto/rand32 and drivers/entropy/api) with those introduced by the
above commit into SoC definitions (nRF5340/nRF9160). This way the test
overlays will overwrite the already existing nodes instead of adding
second instances of them, what leads to build failures at the linking
stage as the related driver supports only single instance (and creates
it for the first node found).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-02-07 14:26:18 +01:00
Carles Cufi
9e77dae6d9 doc: bluetooth: Update overview
Update the Bluetooth overview with additional content.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-02-07 11:58:11 +01:00
Théo Battrel
6dfe5b0e9c Bluetooth: Small fixes for some Bluetooth Shell commands
Update help message of some commands of the Bluetooth Shell that were
inconsistent.

Also add the `dir-rpa` parameter to the advertiser parameters to fully
support directed advertisment parameters.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-02-07 11:58:00 +01:00
Théo Battrel
a3a272a084 Bluetooth: Add some examples for Bluetooth shell
Add some examples of common operations that can be done in the Bluetooth
shell.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-02-07 11:58:00 +01:00
Jamie McCrae
8e4437f394 boards: arm: adafruit_kb2040: Fix missing flash controller
Fixes an issue whereby the flash controller for this board was
missing.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-07 11:46:56 +01:00
Jaska Uimonen
18ce85c201 tests: intel_adsp: ssp: fix dma data sizes
Dma data sizes were incorrect causing segfault in the test, thus fix
them.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-07 01:23:01 -08:00
Ryan Erickson
bec12a098d modem: hl7800: fix low power mode
PSM hibernate mode would draw excessive current
because the UART would be enabled if CTS went low.
In hibernate mode, do not use CTS to power on the UART.

Fix reading of input pin states for low power by reading
the raw value.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-02-07 00:25:53 -08:00
Ryan Erickson
8aeb821a4e modem: hl7800: emit event on band change
Ensure an event is triggered any time the LTE bands change.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-02-07 00:25:53 -08:00
Ryan Erickson
6e58ba5dd8 modem: hl7800: Improve set bands API
Change the API to not block waiting for a reboot.
Reboot asynchronously.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-02-07 00:25:53 -08:00
Ryan Erickson
57b52adc15 modem: hl7800: Improve RAT API
Change the API to not block waiting for a reboot.
Reboot asynchronously.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-02-07 00:25:53 -08:00
Ryan Erickson
fe76aa0959 modem: hl7800: Fix event lock
Change event callback lock to a semaphore to avoid
priority issues the mutexes can cause.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-02-07 00:25:53 -08:00
Théo Battrel
7ea855c83f MAINTAINERS: Add theob-pro as a Bluetooth collaborator
Add myself, theob-pro, as a Bluetooth collaborator

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-02-07 00:19:07 -08:00
Jamie McCrae
461a13c085 doc: release-notes 3.3: Add MCUmgr release notes
Adds changes to the relase notes for MCUmgr changes introduced in
version 3.3.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-06 22:36:57 +09:00
Jamie McCrae
d87a3a75e8 doc: mgmt: img_mgmt: Add note on optional match field response
Adds a note on the new match field which will indicate if the
uploaded data's SHA256 hash matches the provided hash.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-06 22:36:57 +09:00
Gerard Marull-Paretas
d749ce7dfa doc: release-notes: add linear range API
Add notes about the linear_range.h API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-06 22:36:29 +09:00
Gerard Marull-Paretas
300bcbbc0b doc: release-notes: add doc changes
Add relevant documentation changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-06 22:36:29 +09:00
Gerard Marull-Paretas
f52319ac9d doc: release-notes: add regulators changes
Add details on the API overhaul, added drivers and tests.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-06 22:36:29 +09:00
Gerard Marull-Paretas
28e4a409ea doc: release-notes: add removal of some deprecated APIs
Deprecated APIs removed in
https://github.com/zephyrproject-rtos/zephyr/pull/52156

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-06 22:36:29 +09:00
Emil Obalski
5fe8707ed5 samples: ipc: Fix incorrect license
Replace Nordic-5-Clause with Apache-2.0.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-02-06 22:36:05 +09:00
Purdea Andrei
9a7f9ec0ba drivers: usb_dc_rpi_pico: avoid infinite unhandled irq retriggers
This driver enables a number of interrupts it does not attempt to handle.
This results in "unhandled IRQ: 0x...." messages being printed, and the
interrupt handler retriggers immediately again, and this happens again
and again forver, because nothing ends up clearing the interrupt.

This change implements very limited handling of these interrupts. A custom
warning is logged, and the interrupt is cleared.

This change does not imply that doing this is sufficient. More changes may
need to be implemented to more gracefully re-start transactions or
re-arm some endpoints, but this is one step in the right direction,
and at least the OS doesn't freeze up.

Signed-off-by: Purdea Andrei <andrei@purdea.ro>
2023-02-06 22:07:03 +09:00
Vinayak Kariappa Chettimada
3d54d46bbc Bluetooth: Controller: Fix Central from overlapping BIG events
Fix advanced scheduling to consider active BIG events when
establishing new Central connections. This will schedule
AUX_ADV_IND, AUX_SYNC_IND and Central connections of similar
interval to be non-overlapping.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-02-06 22:06:16 +09:00
Vinayak Kariappa Chettimada
d91b20dd3f Bluetooth: Controller: Fix overlapping multiple BIG events
Update advanced scheduling implementation to consider other
active BIG events when scheduling new BIG instances.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-02-06 22:05:40 +09:00
Emil Gydesen
9d3e287572 Bluetooth: Audio: Fix ASCS CP subscribe in discovery
During discovery the unicast client subscribes to the
ASCS CP characteristic. However, this was done asynchronously
at the end of the discovery, and the discovery complete
callback was called before the subscription was done.

Since the unicast client relies on the auto CCC discovery,
the actual subscription takes place a few connection intervals
after the unicast_client_ep_set_cp function was called. The
result of this is that the actual subscription was missing
when the unicast client application starts performing
BAP operations.

The change done here postpones the discovery callback
until after the CP subscription has taken place, ensuring
that the unicast client correctly receives the CP notifications
when performing BAP operations. This also allows the unicast
client to use the discovery parameter in the
bt_audio_discover_params struct, rather than yet another
discovery parameter struct, saving some memory.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-06 22:05:15 +09:00