Commit graph

63542 commits

Author SHA1 Message Date
Erwan Gouriou
42627d3e25 soc/arm: stm32: All stm32h7 based socs have a cache
In c5b59282d6, Kconfig option
CPU_CORTEX_M_HAS_CACHE was added only to a subset of stm32h7 soc
descriptions.
There is no reason not to extend to all socs as they all actually
feature a cache.

Fixes #45073

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-26 12:06:48 -04:00
Aleksandar Markovic
9760c83267 samples: cdc_acm_composite: Use proper type for variable 'read'
Function uart_fifo_read() returns 'int' (it may return negative values
in error cases). Its return value is stored in the variable 'read' that
is, however, of type 'size_t'.

Change the type of the variable 'read' from 'size_t' to 'int' to
accomodate proper handling of uart_fifo_read() invocation.

Coverity-CID: 248408

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-26 12:05:26 -04:00
Michał Narajowski
54cd46ac68 tests/bluetooth/tester: Refactor Read UUID callback
ATT_READ_BY_TYPE_RSP returns Attribute Data List so handle it in the
application.

This affects GATT/CL/GAR/BV-03-C.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2022-04-26 17:38:53 +02:00
Tristan Honscheid
2abb2389a1 ztest API Migration: lib/cmsis_dsp
Migrate some of the unit tests at `lib/cmsis_dsp`
to the new ztest API:

  * lib/cmsis_dsp/basicmath
  * lib/cmsis_dsp/bayes
  * lib/cmsis_dsp/complexmath
  * lib/cmsis_dsp/distance
  * lib/cmsis_dsp/fastmath

`lib/cmsis_dsp/common/test_common.h` has been adapted to use the new
ztest API for the test variant macros, when enabled.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-04-26 08:41:11 -04:00
Tristan Honscheid
8283eb3b54 ztest API Migration: lib/c_lib
Migrate the unit tests at `lib/c_lib` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-04-26 08:38:44 -04:00
Erik Brockhoff
d8f0c1adf6 Bluetooth: controller: implement connection termination on invalid pdus
When a running procedure receives a REJECT or UNKNOWN_RSP PDU that is
not an expected part of the procedure flow this leads to termination
of the connection

This affects procedures:
CU/CPR, CTE, PHY, PING, DLE, FEX, VEX, CHMU

Unit tests are updated to cover the updated behaviour.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-26 14:06:16 +02:00
Benjamin Björnsson
0b87ebbdd3 dts: arm: st: stm32f2: Add missing timers to DTS
This commit adds missing timers to the stm32f2 series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-04-26 11:44:29 +02:00
Emil Gydesen
c972ffddac Bluetooth: ISO: Add additional information for ISO streams
Add all information from the ISO established events
and provide the information in the get_info function.

The use cases of each field heavily depends on what
the ISO streams are used for.

Most, if not all, of the field can be used by the
higher layers to improve quality and/or reliability
of e.g. audio streams that use ISO.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-26 11:35:45 +02:00
Aleksandr Khromykh
6896075b62 Bluetooth: Mesh: add check for rx buffer overflow in pb adv
There is potential buffer overflow in pb adv.
If Transaction Continuation PDU comes before
Transaction Start PDU the last segment number is set to 0xff.
The current implementation has a strictly limited buffer size.
It is possible to receive malformed frame with wrong segment
number. All segments with number 2 and above will be stored
in the memory behind Rx buffer.

Signed-off-by: Aleksandr Khromykh <Aleksandr.Khromykh@nordicsemi.no>
2022-04-26 11:35:33 +02:00
Aleksander Wasaznik
77ad017672 Bluetooth: Shell: Fix off-by-one in address length validation
Fixes Coverity defect id 248346.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-04-26 11:35:19 +02:00
Emil Gydesen
a796927961 Bluetooth: Audio: Make PACS location optional
Make the PACS location characteristic optional, and
also optionally writable.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-26 09:00:48 +02:00
Benjamin Björnsson
c130b16ef3 boards: arm: nucleo_f207zg: Add PWM LEDs to board DTS
This commit adds PWM LEDs to the boards DTS. This was
verified by running the pwm_leds example.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-04-26 09:00:33 +02:00
Peter Johanson
4ce42a134f soc: rpi_pico: Fix enabling i2c on rpi_pico
Select HAS_I2C_DW for RP2040 SoC, and include the
i2c dt-bindings header.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2022-04-26 09:00:25 +02:00
Carlo Caione
82451951cf tests: Misc test fixes for fvp_base_revc_2xaemv8a
Fix several tests for the fvp_base_revc_2xaemv8a board.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-26 09:00:18 +02:00
Herman Berget
bfbbaf2cdb Bluetooth: Fix compilation for entropy_bt_hci
An application with the following config fails to link on nrf53 app
core:

```
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_ENTROPY_GENERATOR=y
```

This happens because `entropy_bt_hci.c` uses functions from
`hci_core.c`, which is only compiled if `BT_HCI_HOST` is selected.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-04-26 09:00:03 +02:00
Krzysztof Chruscinski
acbdbb15dd logging: Fix cbprintf package alignement
Fix alignment fo the cbprintf package withing the log message.
Aligning tests to pass.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-04-25 11:45:39 -07:00
Vinayak Kariappa Chettimada
b035a0a2f5 tests: Bluetooth: init: Cover ext. adv without ext. scan filter policy
Update debug project configuration file to cover building of
Bluetooth with Extended Advertising support without Extended
Scan Filter Policy.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-25 11:44:22 -07:00
Vinayak Kariappa Chettimada
31f49936e2 Bluetooth: Controller: Fix missing cond. compile for ext. scan filter
Fix missing conditional compile when Advertising Extensions
is enabled without Extended Scan Filter Policy support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-25 11:44:22 -07:00
Maureen Helm
5769dffc01 drivers: mm: Use dt_compat_enabled for Intel ADSP TLB driver default
Enables the Intel TLB driver by default when the MM driver class is
enabled (CONFIG_MM_DRV=y) and a compatible devicetree node
("intel,adsp-tlb") is enabled.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-04-25 11:41:31 -07:00
Bartosz Golaszewski
18453017ae west.yml: bump the lvgl revision
This update introduces several bug fixes and improvements:
- correctly handle kscan inputs outside of range
- don't be too verbose with spurious kscan events
- fix the whene param in lvgl's filesystem seek callback

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-04-25 13:23:34 -05:00
Thomas Altenbach
61e250d511 dts: stm32wb55Xg: fix sram size
STM32WB55xG MCUs include 256 KiB of SRAM split into three banks.
The size of the main bank is 192 KiB, and not 96 KiB as it was
specified in the device tree. This commit fixes the issue and
also updates the definition of the NUCLEO-WB55 board, based on
a STM32WB55RG MCU.

Signed-off-by: Thomas Altenbach <taltenbach@witekio.com>
2022-04-25 13:21:23 -05:00
Aleksandar Markovic
a07774eada doc: Fix the layout of POSIX-related tables
Several tables in the section on POSIX support have a column
"Supported" which is supposed to indicate whether a feature,
a function, or similar, is supported in Zephyr or not. This
indication is done by placing character "+" in relevant cells.

However, in restructuredText, "+" is a sign for an element of
a bulleted list (as is the case with "*" and several other
characters). This, in turn, causes very inefficient rendering of
all these cells with "+", since restructuredText adds spacing
before and after any bulleted list.

Fix this by replacing all "+" characters by a simple "yes".

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:07:42 -04:00
Aleksandar Markovic
d2f2fa6d37 doc: Improve layout of network Kconfig options table
The layout of this table unreasonably assigns narrow widths for
for column(s) with lots of content, and wise-versa.

Define relative column widths to be more in sync with column
content. This will potentially produce more compact table, making
it more readable, clearer and more visually pleasing.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:06:31 -04:00
Aleksandar Markovic
9f33129bdf doc: Improve layout of Zephyr-specific DTS properties table
The layout of this table unreasonably assigns narrow widths for
for column(s) with lots of content, and wise-versa.

Define relative column widths to be more in sync with column
content. This will potentially produce more compact table, making
it more readable, clearer and more visually pleasing.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:06:31 -04:00
Aleksandar Markovic
4e7afc4af1 doc: Improve layout of net-shell commands table
The layout of this table unreasonably assigns narrow widths for
for column(s) with lots of content, and wise-versa.

Define relative column widths to be more in sync with column
content. This will potentially produce more compact table, making
it more readable, clearer and more visually pleasing.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:06:31 -04:00
Aleksandar Markovic
019c90e28f doc: Improve layout of MISRA-C rules table
The layout of this table unreasonably assigns narrow widths for
for column(s) with lots of content, and wise-versa.

Define relative column widths to be more in sync with column
content. This will potentially produce more compact table, making
it more readable, clearer and more visually pleasing.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:06:31 -04:00
Gerard Marull-Paretas
9978d06f5b boards: arm: mimxrt1064/1160/1170_evk: add PWM period cell
Add the PWM period cell to PWM driven LEDs. A value of 20 msec has been
chosen as it is the most common value used in other boards.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-25 09:00:03 -05:00
Gerard Marull-Paretas
6a0deb09a8 dts: bindings: pwm: nxp,imx-pwm: add PWM period cell
The PWM period cell will soon be required by the pwm_dt_spec facilities,
this patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-25 09:00:03 -05:00
Gerard Marull-Paretas
9a3ddc396e dts: arm: nxp: nxp_rt/rt11xx: include PWM dt-bindings by default
In order to be consistent with other platforms, include the dt-bindings
for PWM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-25 09:00:03 -05:00
Thomas Ebert Hansen
d1c9efa83d Bluetooth: controller: LLCP PRT rewrite
Rewrite the entire Procedure Response Timeout mechanism.

Use two separate timers for local and remote initiated procedures.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-04-25 15:36:16 +02:00
Andries Kruithof
ecae7a9c7f Bluetooth: controller: llcp: terminate connection on collission
As per bluetooth spec Vol. 6 part B section 5.3 we need to terminate
the connection under given situation

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2022-04-25 15:35:45 +02:00
Piotr Pryga
0ead951649 Bluetooth: Controller: llcp: Fix PHY update instant val if no PHY change
BT Core spec 5.3 Vol 6, Part B section 2.4.23 LL_PHY_UPDATE_IND says:
"If both the PHY_C_TO_P and PHY_P_TO_C fields are zero then there is no
Instant and the Instant field is reserved for future use."
Fields that are reserved for future shall be filled with zeros.

New LLCPs implementation didn't handle this case and set the instant
as if there were a PHY change. That caused qualification tests to fail.

The commit fixes the issue.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-04-25 13:10:42 +02:00
Pete Dietl
d92e3b88ba drivers: CAN: Fix unused parameter warnings when compiling with -Wextra
Since the CAN header file is included directly by application code,
an application developer including this file and only applying
-Wextra to the application source files will see many warnings.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2022-04-24 19:49:04 +02:00
Gerard Marull-Paretas
731e068dfb dts: bindings: pwm: snps,designware-pwm: remove unused binding
The binding has no corresponding driver and it is not referenced
anywhere, so drop it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:55 +02:00
Gerard Marull-Paretas
12bcebfa6c dts: bindings: pwm: microchip,xec-pwm: add missing PWM cells
The binding did not define the PWM cells. Only channel and period have
been added as they are the minimum required ones (flags are not supported).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:55 +02:00
Gerard Marull-Paretas
fbc2c5d334 dts: bindings: pwm: litex,pwm: add missing PWM cells
The PWM cells were not specified in the bindings file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:55 +02:00
Gerard Marull-Paretas
ba0a054e43 boards: riscv: tlsr9518adk80d: fix PWM LED polarity
The polarity cell was set to '0', but needs to be 'PWM_POLARITY_NORMAL'
(LED is driven in active level).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:49 +02:00
Gerard Marull-Paretas
7e86d858cf boards: riscv: tlsr9518adk80d: add PWM period cell
Add the PWM period cell to PWM driven LEDs. A value of 20 msec has been
chosen as it is the most common value used in other boards.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:49 +02:00
Gerard Marull-Paretas
bc0e425324 dts: bindings: pwm: telink,b91-pwm: add PWM period cell
The PWM period cell will soon be required by the pwm_dt_spec facilities.
This patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:49 +02:00
Gerard Marull-Paretas
92f50c4760 dts: riscv: telink_b91: include PWM dt-bindings by default
In order to be consistent with other platforms, include the PWM
dt-bindings by default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:49 +02:00
Gerard Marull-Paretas
f2cf96ef71 dts: bindings: pwm: ite,it8xxx2-pwm: add PWM period cell
The PWM period cell will soon be required by the pwm_dt_spec facilities.
This patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:43 +02:00
Gerard Marull-Paretas
d17f29a0b8 boards: arm: mimxrt685_evk: add PWM period cell
Updated all PWM specs to include the period cell. Because all specs
refer to PWM driven LEDs, a period of 20 msec has been chosen, as most
other platforms do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:36 +02:00
Gerard Marull-Paretas
49476f4fac boards: arm: lpcxpresso55s69: add PWM period cell
Updated all PWM specs to include the period cell. Because all specs
refer to PWM driven LEDs, a period of 20 msec has been chosen, as most
other platforms do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:36 +02:00
Gerard Marull-Paretas
9f8e33573e dts: bindings: nxp,sctimer-pwm: add PWM period cell
The period cell will soon be required by the pwm_dt_spec facilities,
this patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:36 +02:00
Gerard Marull-Paretas
a813ca249f boards: arm: frdm_kw41z: fix PWM LEDs polarity
The PWM driven LEDs are active low, so the polarity has to be inverted.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:29 +02:00
Gerard Marull-Paretas
b6ff07aa83 boards: arm: frdm_kw41z: fix PWM LEDs period
The period was set to 0, a value not meaningful to drive an LED. A value
of 20 msec has been chosen as most other boards do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:29 +02:00
Gerard Marull-Paretas
df31bce2a7 dts: arm: nxp: nxp_kw4{0,1}z: include PWM dt-bindings
In order to be consistent with other platforms, include the PWM
dt-bindings by default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:29 +02:00
Gerard Marull-Paretas
20889b41e2 boards: arm: silabs: add PWM period cell
The PWM specifier required the period cell. This patch adds it to all
Silabs based boards. Since all occurrences are PWM drive LEDs, a period
of 20 msec has been chosen as most other boards do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:22 +02:00
Gerard Marull-Paretas
71d8d9d9bb dts: arm: silabs: add period cell to PWM
The PWM period cell will soon be required by the pwm_dt_spec facilities,
this patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:22 +02:00
Gerard Marull-Paretas
f3b9d463a0 boards: arm: nuvoton: add PWM period cell
The PWM specifier required the period cell. This patch adds it to all
Nuvoton based boards. Since all occurrences are PWM drive LEDs, a period
of 20 msec has been chosen as most other boards do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:16 +02:00