Commit Graph

73799 Commits

Author SHA1 Message Date
Joakim Andersson cc8493c3ba doc: tfm: Document how to pass list arguments to the TF-M build system
Document how to pass list arguments to the TF-M build system.

fixes: #53556

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-01-11 03:05:53 +09:00
Henrik Brix Andersen 4c90d05452 doc: develop: api: overview: mark the CAN controller driver API stable
Mark the CAN controller driver API as stable.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-10 17:05:05 +01:00
Francois Ramu 823b0e6016 dts: arm: stm32u5 family has a x2 factor on its LPTIM clock
Add the st,static-prescaler DTS property to the
stm32u5 family on the LPTIM1.
Also present on lptim3, 4 but not defined yet.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-10 15:54:25 +00:00
Francois Ramu c14670abea drivers: timer: lptim timer clock on stm32u5 has a prescaler
The stm32 devices shows a x2 factor on the LPTIM1,3,4
clock source but it acts as a prescaler.
The max lptim counter (timebase) is counting 4 sec
In that case, the LPTIM count unit is double.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-10 15:54:25 +00:00
Francois Ramu 572b286010 dts: bindings: LPtimer of stm32 has a x2 factor on its clock
Add a st,static-prescaler optional property to DTS
of the stm32 where the LPTIM has a x2 factor on
its clock input.
This property is present or not depending on the stm32.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-10 15:54:25 +00:00
Stephen Stauts d4b8db792d scripts: kconfig: Add functions for array/chosen props
Expands kconfigfunctions to include checks for value existence in
an array property by nodelabel, or a chosen's boolean prop value.

Signed-off-by: Stephen Stauts <stephen.stauts@nordicsemi.no>
2023-01-10 07:10:07 -08:00
Robert Lubos 76dd77df7e net: zperf: Fix potential build warning
A variable was defined directly after a label in two case statements,
resulting in build warning with certain compilers.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-10 14:07:21 +00:00
Tomasz Bursztyka c9ef674f0e arch/x86: Fix compilation error
arch_dcache_range() function does not exist anymore, nor K_CACHE_WB
macro. Removing it entirely.

arch_dcache_flush_range() signature changed, so relevantly applying
these.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-01-10 14:06:33 +00:00
Troels Nilsson d7acb9355c Bluetooth: controller: Fix JIT rescheduling for ext. advertising
Fixes two issues with the JIT scheduler:

Rescheduling of primary advertising packets for extended advertising
when using the JIT scheduler did not work, since the done events for
the primary events never made it into the reschedule logic

The EVENT_DONE_EXTRA_TYPE_ADV_AUX event (for auxillary packets) could
cause a "reschedule" for a primary event that was actually sent
successfully (causing it to be sent twice)

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-01-10 14:05:42 +00:00
Alp Sayin 345b3bca02 samples: subsys: zbus: benchmark: remove all platform exclusions
The sample is now able to run on all previously excluded platforms.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin f5c39f998c samples: subsys: zbus: benchmark: use native posix host rtc for ARCH_POSIX
Because posix emulated execution is significantly faster than posix
emulated timer and benchmark finishes before even the first tick occurs.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin 560c727127 samples: subsys: zbus: benchmark: use sys_clock_cycle instead of k_uptime
Needed because benchmark finishes faster than a tick, especially on
emulated platforms where tick rate is 100Hz. Output units are also updated
to print numbers with less digits.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin ec9c3df239 samples: subsys: zbus: benchmark: increase thread stack sizes
Stack sizes need to be dependent on something arch specific such as
idle stack size because they're smashing their stacks.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Jamie McCrae fc9442c033 samples: mgmt: mcumgr: Fix fs overlay
Fixes the filesystem overlay by enabling flash map, which is
needed for lfs.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 13:49:32 +01:00
Jamie McCrae b8ef838069 mgmt: mcumgr: Select console if using UART transport
This prevents a configuration error by selecting the console if
the UART MCUmgr transport is used, which is actually a dependency
for this transport.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 13:49:17 +01:00
Daniel DeGrasse 9a63abc5c6 sd: utilize sdmmc_wait_ready with SPI mode.
Update sdmmc framework to use sdmmc_wait_ready when accessing card in
SPI mode. this will allow cards that do not return to ready to be polled
for busy status until the SD data timeout expires

Fixes #52931

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-10 13:29:32 +01:00
Krishna T b59c89123c net: shell: Add support to set Ethernet MAC address
Add a shell command to set Ethernet MAC address, useful in configuring
custom/local MAC addresses.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-01-10 13:29:22 +01:00
Krishna T 6e3e10e6cd net: shell: Fix duplicate tag
Recently introduced MISRA-C CI check complains about use of a duplicte
tag, so, shorten the variable from shell->sh to avoid same name as the
structure.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-01-10 13:29:22 +01:00
Nick Ward 4ed49cf99b net: openthread: Depreciate openthread_set_state_changed_cb API
Will be replaced by APIs:
 - openthread_state_changed_cb_register
 - openthread_state_changed_cb_unregister

Signed-off-by: Nick Ward <nick.ward@ftpsolutions.com.au>
2023-01-10 13:29:15 +01:00
Nick Ward 583545b662 net: openthread: Add state change callback list
Add a new callback list structure for state change information.

These APIs are meant to eventually replace the single callback API
provided by openthread_set_state_changed_cb().

This will allow multiple users to gain information about
OpenThread stage changes.

Note CONFIG_OPENTHREAD_MAX_STATECHANGE_HANDLERS
with OpenThread's otSetStateChangedCallback() API can also be
used to enable registration of multiple callbacks of this type but this
cannot be modified if a certified OpenThread binary is used in the
build.

Signed-off-by: Nick Ward <nick.ward@ftpsolutions.com.au>
2023-01-10 13:29:15 +01:00
Jamie McCrae 11c7371f99 samples: Explicitly disable boot USB device support init at boot
Disables having USB enabled for boards that configure USB CDC for
console, shell or logging at bootup in applications that enable USB
to prevent a conflict arising whereby USB is registered from
multiple points and later calls fail.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 12:21:10 +01:00
Johann Fischer f09111a2a9 samples: cdc_acm: do not block for one second after DTR set
There is no need to block the thread for a second.
Let it sleep for 100 milliseconds, which should be enough
to set the host baud rate.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-10 10:30:46 +01:00
Johann Fischer 7a90b221a5 usb: device: bluetooth: remove USB_TRANS_NO_ZLP for OUT transfers
USB_TRANS_NO_ZLP flag has no meaning for usb_transfer() in
host-to-device direction (USB_TRANS_READ).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-10 10:30:46 +01:00
Gerard Marull-Paretas 036e4f2902 ci: doc-build: use Doxygen 1.9.6
Use the latest release of Doxygen, 1.9.6.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-10 10:27:54 +01:00
Gerard Marull-Paretas 481ae767cb doc: doxygen: update Doxyfile for 1.9.6
Update the Doxyfile using `doxygen -u doc/zephyr/doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-10 10:27:54 +01:00
Pirun Lee 7015578ff4 sample: bluetooth: OTS sample add checksum
central_otc: read checksum after object data read.
peripheral_ots: add checksum calculate cb.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2023-01-10 09:59:36 +01:00
Pirun Lee 1e6f36cca7 Bluetooth: OTS - Add Calculate Checksum support
OTS add Calculate checksum feature support.
OTS client add object calculate checksum function.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2023-01-10 09:59:36 +01:00
Filip Kokosinski 4858f8d667 boards: make names in platform YAML files unique
This commit makes names in the platform YAML files unique.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-01-10 09:59:25 +01:00
Emil Gydesen 4716438c20 Bluetooth: Audio: Modify the compile guard for audio_iso.c
audio_iso.c should only be compiled if we require any streams,
so it is now guarded by CONFIG_BT_AUDIO_STREAM.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-10 09:58:54 +01:00
Nicolas Pitre bb3795505d tests/net/socket: fix compiler warnings
warning: format '%d' expects argument of type 'int', but argument 3
has type 'size_' {aka 'long unsigned int'} [-Wformat=]

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-01-10 09:58:01 +01:00
Krishna T d796f23e0e net: wifi_mgmt: Add support for power save configuration
Add support for configuring power-save in Wi-Fi chipsets, supports
Legacy, WMM and TWT.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-01-10 09:52:11 +01:00
Krishna T 3f4597d0c9 net: l2: wifi: Arrange commands in alphabetical order
This helps find the command needed easily.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-01-10 09:52:11 +01:00
Mathis Raemy c4b07e8321 drivers: flash: bug fix inline function was not inlined
During flash operation, you have to disable XiP which force function
to be located in RAM. On top of that, the function `flash_put_cmd_addr`
is time critical so we need to declare as inline. For some reason,
sometimes the function was not really inline. Changed it to
ALWAYS_INLINE fixed the bug.

Signed-off-by: Mathis Raemy <mathis.raemy@gmail.com>
2023-01-10 09:26:37 +01:00
Sjors Hettinga 1be1b472cd net: tcp: Extend TCP receive queue timeout
After several fixes of the re-ordering logic in TCP, the receive queue
works as intended and cleans itself up properly. Previously the default
timeout was 100 ms, which pretty much disables it for real applications.

Increase the timeout to 2 seconds to actually enable it for in practice.
This should help pass much more of the Maxwell Pro tests.

This is the first step before removing the timeout completely.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-01-10 09:26:28 +01:00
Jamie McCrae 514c02c1fc doc: release: 3.3: Mention removal of tinycbor module
Adds tinycbor removal to the release notes and suggets updating
to use zcbor.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 09:26:12 +01:00
Jamie McCrae fd4090819a tinycbor: Remove deprecated/obsolete module
This removes the tinycbor module and replaces references in it
e.g. in sample text to use the zcbor replacement.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 09:26:12 +01:00
Emil Gydesen ce9385b388 Bluetooth: Audio: Shell: Fix compile warning for 0 client snk/src ASE
In case that CONFIG_BT_AUDIO_UNICAST_CLIENT_ASE_SNK_COUNT or
CONFIG_BT_AUDIO_UNICAST_CLIENT_ASE_SRC_COUNT is set to NULL, the
unicast client implementation in the shell would have compile
warnings, since the arrays would be 0 and we would attempt to
access it some places (or rather the compiler/linker would
think that, but it would never happen at runtime).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-10 09:25:36 +01:00
Krzysztof Chruscinski b2c7c27894 Revert "test: log_output: Exclude qemu_arc_hs5x"
This reverts commit dfbfb3ff67.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-10 09:24:08 +01:00
Gerson Fernando Budke 204758b5d9 samples: fs: littlefs: Add stm32l562_dk and b_u585i_iot02a
Add configs and overlays to run boards stm32l562_dk and b_u585i_iot02a.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-10 09:23:59 +01:00
Gerson Fernando Budke 79184d9dde boards: stm32: Fix external storage
The stm32l562e_dk and b_u585i_iot02a boards have same external NOR
memory. This harmonize both definitions and fix total partition size
to correct 64MB.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-10 09:23:59 +01:00
PawelX Dobrowolski 07052aba13 logging: days in months calculation fix
Array 'days_in_month' of size 12 may use index value bigger then
count of its elements.

Signed-off-by: PawelX Dobrowolski <pawelx.dobrowolski@intel.com>
2023-01-10 09:23:35 +01:00
PawelX Dobrowolski 20ed64be62 logging: prevent of NULL pointer comparison
Add prevent dereference NULL in strcmp

Signed-off-by: PawelX Dobrowolski <pawelx.dobrowolski@intel.com>
2023-01-10 09:23:35 +01:00
TOKITA Hiroshi 148d205c12 test: unit: util: add BIT_MASK macros tests
Adding tests for BIT_MASK, BIT_MASK64, IS_BIT_MASK, and IS_BIT_MASK_SHIFTED

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
TOKITA Hiroshi c1fc906599 drivers: counter: gd32_timer: Remove is_bit_mask() implementation
Replace is_bit_mask() with IS_BIT_MASK() and remove the implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
TOKITA Hiroshi 33963c43ca drivers: counter: nrfx_timer: Remove is_bit_mask() implementation
Replace is_bit_mask() with IS_BIT_MASK() and remove the implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
TOKITA Hiroshi 21dc3f58e4 drivers: counter: nrfx_rtc: Remove is_bit_mask() implementation
Replace is_bit_mask() with IS_BIT_MASK() and remove the implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
TOKITA Hiroshi 429b05a79a drivers: counter: stm32_timer: remove counter_stm32_is_bit_mask() function
Remove implementation of counter_stm32_is_bit_mask() and
Use IS_BIT_MASK() macro.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
TOKITA Hiroshi 8eff4b6036 include: sys: util_macro: add IS_BIT_MASK()/IS_SHIFTED_BIT_MASK()
Add IS_BIT_MASK() macro for determining whether a value is set bits
continuously from the LSB.
This macro is not dependent on bit-width and works in contrast to
BIT_MASK() and BIT64_MASK().
IS_SHIFTED_BIT_MASK() is a version of IS_BIT_MASK() that allows setting
the start bit of continuous bits.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
Jamie McCrae de313d748a tests: mgmt: mcumgr: Add callback notification grouping test
Adds a test that check that grouped events work.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-09 17:36:04 -08:00
Jamie McCrae d6758557f5 tests: mgmt: mcumgr: os_mgmt_info: Check grouped events
Changes one of the callback register/unregister functions to use
2 events OR'd together instead of 2 events registered separately,
this is to help test that grouped events are working.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-09 17:36:04 -08:00