Commit graph

85,247 commits

Author SHA1 Message Date
Francois Ramu
a0a124c5da dts: arm: stm32f303 vref characteristics is 3V
The vref has to be set to 3000mV.
It is the voltage to find on the stm32F3.
is fixed by the platform to be lower or equal to VDDA.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-23 10:47:23 +00:00
Carles Cufi
aa405076db doc: relnotes: Add Bluetooth release notes for 3.2.0
Populate the Bluetooth release notes and clean up the existing ones.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-09-23 12:40:52 +02:00
Stephanos Ioannidis
384ff96b25 Revert "tests: kernel: interrupt: Disable on ARM64 QEMU targets"
This reverts the commit 7d8a119213
because GCC is now configured to not emit ldp/stp Qn instructions for
consecutive 32-byte loads and stores, and the nested interrupt handling
failure due to the missing emulation of these instructions no longer
occurs.

For more details, refer to the GitHub issue #49491 and #49806.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-23 12:10:25 +02:00
Stephanos Ioannidis
2689590e67 arch: arm64: Disable ldp/stp Qn for consecutive 32-byte loads/stores
GCC may generate ldp/stp instructions with the Advanced SIMD Qn
registers for consecutive 32-byte loads and stores.

This commit disables this GCC behaviour because saving and restoring
the Advanced SIMD context is very expensive, and it is preferable to
keep it turned off by not emitting these instructions for better
context switching performance.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-23 12:10:25 +02:00
Wojciech Slenska
a4264f3e86 drivers: w1: added casting
This casting is needed in c++ to avoid compilation error.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2022-09-23 12:09:21 +02:00
William MARTIN
8bbe016f46 drivers: Fix BMI270 initialization
On power on reset, after disable advanced power safe mode,
you need to wait a delay before write again in the device.
The missing wait produce random initialization failure.
See §4.4 of the datasheet "bst-bmi270-ds000.pdf"

Signed-off-by: William MARTIN <william.martin@power-lan.com>
2022-09-23 12:08:24 +02:00
Tomasz Moń
8c7eba346a driver: usb_dc_sam_usbhs: Restore EP0 after detach
SAM V71 Xplained Ultra failed to re-enumerate on the bus after device
detach-attach sequence. The device was recognized by the host, but it
was not responding to control transfers, i.e. it was not acknowledging
SETUP data. Make device acknowledge SETUP data by reconfiguring EP0
when necessary.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-09-23 11:52:18 +02:00
Tomasz Moń
37705bc554 driver: usb_dc_sam_usbhs: Actually set detach bit
Device physically detaches when the DETACH bit is set. Fix the
assignment to actually set the bit instead of clearing it.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-09-23 11:52:18 +02:00
Vinayak Kariappa Chettimada
b867f0e8a6 Bluetooth: Controller: Fix T_MAFS between broadcasting roles
When calculating the offsets between primary advertising
PDU, auxiliary PDU, Periodic Advertising PDU, and BIS PDU,
the values used as anchor points for starting the periodic
interval for auxiliary, periodic and BIG events, should be
ensured to have the minimum auxiliary frame spacing T_MAFS
between the PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 11:51:52 +02:00
Vinayak Kariappa Chettimada
1bbe209a30 Bluetooth: Controller: Fix auxiliary scan stop assertion check
Use a local variable to assert check on auxiliary context's
release.
Add missing volatile qualifier to the parent field of the
auxiliary scan context.
Under race condition a released aux context can be allocated
for reception of chain PDU of a periodic sync role, hence
fix the assertion check to consider that the released
context can be allocated to other roles.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 08:11:39 +00:00
Fabio Baltieri
6d67a81e19 doc: release-notes: update the whole Boards & SoC section
Update the whole section based on what was in boards/*/* for v3.1.0 and
main. Sort the lists and remove the empty sections.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Fabio Baltieri
340ecef59b doc: release-notes: add a note about tests & samples
Mention the ztest api conversion and new tests expectations.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Fabio Baltieri
cd283adfd6 doc: release-notes: add notes for few session with no maintainers
Add few release notes from changes in sections that do not list an
explicit maintainer, taken from:

git log v3.1.0..main drivers/interrupt_controller
git log v3.1.0..main drivers/memc
git log v3.1.0..main drivers/power_domain

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Fabio Baltieri
bba44e7fd3 doc: release-notes: mention civetweb module removal
Add a line to mention the removed civeteweb module and code.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Vinayak Kariappa Chettimada
16e0e6607c Bluetooth: Controller: Increase BIS PDU access address receive timeout
Increase the BIS PDU access address receive timeout, use the
+/- 2 us jitter for each subevent.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 09:57:06 +02:00
Ming Shao
2cea5850e2 twisterlib: re-add the logic to drain the serial leftover
This logic was added before but seems to be missed during the
twister refactoring.

Some tests can cause serial leftover logs buffered somewhere.
Such leftover can interfere with the next test case because the
serial log monitoring thread is started before a board is flashed.
And the monitoring thread can be fooled by such leftover logs and
make incorrect judgement of the test result.

A simple ser.flush() is not enough to eliminate such leftovers.
So add explicit readline() to drain such logs which ensures a clean
serial context for the case that follows.

An example from reel board captured with this patch:

leftover log of previous test: b'.287 seconds\r\n'
leftover log of previous test: b' - SKIP - [...test_coredump_backend]...
leftover log of previous test: b'\r\n'
leftover log of previous test: b'------ TESTSUITE SUMMARY END ------\r\n'
leftover log of previous test: b'\r\n'
leftover log of previous test: b'=====================================...
leftover log of previous test: b'RunID: 4e93757ad...53dcab9f0f5c6\r\n'
leftover log of previous test: b'PROJECT EXECUTION SUCCESSFUL\r\n

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-09-22 15:15:55 -05:00
Erwan Gouriou
5e756c195a doc: release-notes 3.2: STM32: Fix note on SDMMC driver update
STM32 SDMMC: DMA is actually available only for DMA-V1 compatible
devices.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-22 20:06:41 +00:00
Chris Friedt
8a262651af doc: release: 3.2: Add POSIX changes
Add POSIX changes to release notes for Zephyr v3.2.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-09-22 11:43:39 -05:00
Meng xianglin
7f37facddf tests: mem_protect: sys_sem: move a test case to new ztest API
move test case test_sem_take_timeout_fails() to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-22 16:42:51 +00:00
Mahesh Mahadevan
6c6d0aa85e doc: Add NXP items to 3.2 release notes
Add NXP items to 3.2 release notes

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-22 11:39:12 -05:00
Robert Lubos
2e901a841d doc: release-notes: Add 3.2.0 release notes for networking
Add Zephyr 3.2.0 release notes for the networking area.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-09-22 18:06:52 +02:00
Vinayak Kariappa Chettimada
24efea7ba1 Bluetooth: Controller: Fix infinite loop receiving ISO Data
Fix inifinite loop in ll_rx_get() when both ISO Broadcast
and ISO Receive features are enabled in a build. Missing
conditional compile prevented the ack_last index that
maintains a relation between number of packets complete and
the received data packets was unassigned.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-22 18:05:36 +02:00
Piotr Pryga
047b756e64 Bluetooth: df: Add ntf of insufficient resources for IQ samples
According to Bluetooth 5.3 Vol 4, Part E section 7.7.65.21 the
Controller should send an IQ report with Packet_Status set to 0xFF
and Sample_Count to 0x0, to inform Host that it is not able to
store IQ samples for all received Constant Tone Extensions and has
failed to sample at least once.

This commit adds handling of such situation for direction finding
in connectionless mode in lower link layer. It includes:
- lack of node_rx_iq_report to store IQ samples,
- lack of free node_rx to report received advertising data (generates
  an advertising data report with indication "incomplete, no more to
  come" and cancels reception of chained PDUs,
- cancellation of chained PDUs reception due to other scheduling
  reasons.
In all of these situations CTE reception must be enabled and number of
received CTEs is smaller than requested by Host.

If there is not sufficient number of node_rx_iq_report nodes and
report was generated, the CTE will not be samples in a given
periodic advertising synchronization event. The CTE will be
sampled again in next event if there are node_rx_iq_report available.

End user applications may check periodic advertising sync event
counter when use of the reports to be sure about sync event
the received report is connected with.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-09-22 18:04:00 +02:00
Dominik Ermel
e4d0bf0e64 mgmt/mcumgr: Fix image erase returning improper error code on error
The img_mgmt_erase could return MGMT_ERR_EOK even when
img_mgmt_impl_erase_slot failed.

Fixes #50522

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-22 15:32:04 +00:00
Erwan Gouriou
ce1377c5ee boards: stm32: Update doc for STM32U5/L5 boards
Update documentation for STM32U5 and STM32L5 based boards:
- Zepĥyr SDK openocd can be used instead of openocd ST fork.
- All these boards use a STLinkV3 instead of V2.
- Update (or provide when missing) instructions for building and
flashing TFM applications.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-22 10:23:58 -05:00
Gerhard Jörges
1e87837f2a drivers: spi: pl022: fix dropping RX bytes
If the thread that submits data over spi is interrupted by a higher
priority thread while pushing data to the tx fifo the hardware pushes
data to spi and frees up space in the fifo. In this case more than
8 Bytes are written to the tx fifo and bytes in the rx fifo get lost
before they are collected in the rx while loop.
To avoid this, the tx loop is exited after a maximum of 8 bytes and the
rx loop will run until it collected all bytes from the rx fifo.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2022-09-22 17:16:45 +02:00
Torsten Rasmussen
af4a87af8e cmake: support relocating of a board folder
Fixes: #49116

During development of out-of-tree boards and applications it is not
uncommon to refactor / restructure code.

To allow developers more freedom, let's check that board's defconfig
still exists during a CMake re-run.
If the defconfig no longer exists, either because it's been moved or
deleted, then warn the user and set BOARD_DIR to NOTFOUND.

The NOTFOUND will request CMake to search for the new location in all
board roots. If the board has not been found, as example it's deleted,
then the existing error is printed later.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-22 17:14:20 +02:00
Marc Herbert
3ebb18b882 cmake: fix utterly cryptic error handling in the -DSPARSE=y build
Fixes commit 7a85ff7683 ("add sparse support")

The sparse build needs (at least) two things:
1. sparse to be in the PATH
2. the environment variable REAL_CC to be defined and to match the
   value expected by CMake

Fix error messages when either condition is wrong.

- New error message when 1. is not satisfied:
```
CMake Error at zephyr/cmake/compiler/gcc/target.cmake:12 (find_program):
  Could not find CMAKE_C_COMPILER using the following names: cgcc
```

- Previous error "message" when 1. is not satisfied:
```
CMake Error at zephyr/cmake/compiler/gcc/target.cmake:17 (message):
  C compiler
  ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc
  not found - Please check your toolchain installation
```
Note the "not found" cross-compiler actually exists!

- New error message when 2. is not satisfied:
```
Kconfig header saved to 'ws/build-tgl/zephyr/include/generated/autoconf.h'
-- Found sparse: /home/user/sparse/cgcc
CMake Error at ws/zephyr/cmake/compiler/gcc/target.cmake:25 (message):
  The only way to override its 'cc' default when cross-compiling with
  sparse is unfortunately an environment variable.  So you _must_ set
  REAL_CC at both configuration time and build time to:
  $ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc

```

- Previous error "message" when 2. is not satisfied:
```
modules/hal/xtensa/include/xtensa/config/core.h:54:10:
    error:unable to open 'core-isa.h'`
```

Also: stop using the same name REAL_CC for both the internal CMake
variable and the external sparse parameter; they're two different
things so name them differently. Environment variable messes are
complicated enough.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-09-22 15:12:22 +00:00
Jamie McCrae
10f9d576f4 doc: release: 3.2: Add MCUMGR changes
Adds MCUMGR changes to the release notes.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-22 10:09:22 -05:00
Francois Ramu
6507afd07e drivers: adc: driver for stm32wl configure sampling
This Commit makes the adc configuration correct
for using the adc with 12b conversion on the stm32wl.
TriggerSource must be set to SW.
The ADC clock must be disabled by clock gating during CPU1 sleep/stop.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-22 15:06:20 +00:00
Ming Shao
0e1eba523e reel_board: remove the hw_reset which blocks flashing
The hw reset type is blocking the flash of reel_board.
It seems removing it can fix the issue.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-09-22 15:02:53 +00:00
Tim Lin
3474ba919f ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C
FIFO2 can be selected to support channel of B or C by dtsi.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin
c30ec3ba4d ITE: drivers/i2c: Rename the parameter in data struct
Rename the parameter in data struct to avoid confusion.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin
de1fc0ca89 ITE: drivers/i2c: Fix the bug of msgs in I2C transfer
1. To explicitly set the MSG_START flag on the first message.
2. Remove redundant declare.
3. Using data->msgs->flags is the correct address instead of
   msgs->flags.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Henrik Brix Andersen
a92e68b626 doc: release-notes: minor fixup to the CAN release notes for v3.2.0
Add a couple of minor fixups to the CAN related release notes for Zephyr
v3.2.0 (fixed typo and removed duplicate entry).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-22 09:30:09 -05:00
Stephanos Ioannidis
357b2231de doc: release-notes: Add C++ subsystem release notes for 3.2
This commit adds the C++ subsystem release notes for the Zephyr 3.2
release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-22 09:22:53 -05:00
Enjia Mai
77986382df tests: framework: fix code coverage report on zephyr-sdk-0.15
The GCC/GCOV version over 12 has slight format change of the gcno
and gcda. Make some adaption in the gcov dump function to fix the
code coverage report.

Mainly two places change:
1. Added the checksum in the struct gcov_info. This fix the crash
in qemu_x86, and mps2_an385 when run with --coverage.

2. Adjust the GCOV_TAG_FUNCTION_LENGTH accroding to gcov-io.h. It's
length unit is caculated by bytes now.

Fixes #50255.
Fixes #50257.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-22 14:14:39 +00:00
Gerard Marull-Paretas
fa308ca191 doc: release-notes: fix syntax issues
This patch fixes a couple of syntax issues that lead to incorrectly
rendered content:

- Bad list indentation
- Missing blank line between list item and sub-item.

Also made 'label' a literal.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-22 13:54:45 +00:00
Vinayak Kariappa Chettimada
30823c6f56 Bluetooth: Controller: Fix stream index use in Broadcast ISO Tx
Fix incorrect use of stream handle instead of connection
handle to enqueue Tx ISO Data, and use stream index to get
stream instance.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-22 15:53:35 +02:00
Stephanos Ioannidis
e52b621d6c doc: release-notes: Add C library release notes for 3.2
This commit adds the C library release notes for the Zephyr 3.2
release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-22 15:46:49 +02:00
Fabio Baltieri
96fc137654 twister: treat imgtool image exceeded as flash overflow
Twister detects FLASH overflow and skips tests that trigger that
condition by default, but sometimes images are just on the flash size
limit and then overflows at a later stage when imgtool adds a trailer,
which gets detected as a build fail and fails the run.

This detects the imgtool flash overflow together with the normal build
ones, causing the build to be skipped on imgtool flash overflow as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-22 12:41:25 +00:00
Gerard Marull-Paretas
7e6e4579c2 doc: release-notes: add details on pinctrl/pinmux changes
Inform about pinmux deprecation and add relevant changes in the pinctrl
area.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-22 10:55:44 +00:00
HaiLong Yang
ea59b0ce79 doc: release: 3.2: add GigaDevice changes
More GigaDevice support added, include drivers, boards, etc.
Also, some known issue has been fixed.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-09-22 10:54:27 +00:00
Kevin Townsend
5af0fbc2e3 doc: release-notes: Add Aarch32 release notes
Adds Aarch32 release notes for Zephyr 3.2.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-22 10:08:10 +02:00
Kevin Townsend
d180be37a1 doc: release-notes: Add TF-M release notes
Adds release notes for Zephyr 3.2 related to TF-M.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-22 10:07:53 +02:00
Pavel Vasilyev
e4921cc84d Bluetooth: Mesh: Trigger GATT update when subnet is added
When the node is part of only one subnet, it starts Network ID
advertisements with infinite timeout. It is not an issue when using
legacy advertising and extended advertising with shared set for local
messages and GATT because any message will stop advertisements. However,
when a separate adv set is used for GATT advertisements,
`struct bt_le_ext_adv_cb.start` callback won't be called, but the
implementation relies on that callback to switch to a next subnet.
Calling `bt_mesh_adv_gatt_update()` stop GATT advertisement so that the
implementation can switch to the next subnet.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Pavel Vasilyev
20a3a83c9f Bluetooth: Mesh: Fix node identity interleave multiple subnets
Reduce advertising duration to `max_timeout` when advertising node
identity for multiple subnets. This will let the node to interleave
subnets for NODE_ID_TIMEOUT.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Pavel Vasilyev
326786efd6 Bluetooth: Mesh: Avoid indefinite timeout when duration less than zero
`struct bt_le_ext_adv_start_param.timeout` resolution is in 10ms. When
duration is less than 10ms, division will be evaluated to zero, which
will result in indefinite timeout. Set timeout to 10ms to avoid
indefinite timeout. The advertisement will end earlier anyway after the
event is finished.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Daniel Leung
55c4e06b35 doc: release-notes/3.2: add bits on serial/UART drivers
This mentions changes on serial and UART drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
e285034579 doc: release-notes/3.2: add bits on PECI drivers
This adds bits about PECI drivers:

* Devicetree binding changes for the ITE it8xxx2 driver.
* New driver for Nuvoton NPCX.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00