Commit Graph

61981 Commits

Author SHA1 Message Date
Erwan Gouriou 2b3f728173 boards: Remove superfluous comments in boards.dts
If more information is required on anything, one should look at
documentation, no point to add a specific comment about it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-22 12:34:22 +01:00
Yuval Peress 347a297da2 modules: fff: Fix issue with tests being skipped in CI
The filter in the testcase.yaml made it impossible for these to run.
Also, the Kconfig names for the options didn't really make much sense
so they were renamed to avoid conflict.

This fixes an issue found by #36433.

Signed-off-by: Yuval Peress <peress@google.com>
2022-03-22 12:33:58 +01:00
Vinayak Kariappa Chettimada d214bc5340 Bluetooth: Controller: Fix uninitialized param in sync report
Fix uninitialized param field when generating incomplete
no more data to come periodic advertising report.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-22 12:33:49 +01:00
Vinayak Kariappa Chettimada 6fb38eb24f Bluetooth: Controller: Fix sync reports post terminate and rx disable
Fix generating periodic advertising reports post sync
terminate under race condition when disabling reporting or
terminating the sync or while performing HCI reset.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-22 12:33:49 +01:00
Vinayak Kariappa Chettimada a602a18660 Bluetooth: Controller: Add static build assert to check mem member
Added BUILD_ASSERT definition to check for safe access to
memory pool allocated memory structure member after the
memory has been released back to mem pool.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-22 12:33:49 +01:00
David Leach c243da02ed code_relocation: Move NOCOPY flag to avoid OS drive colon
COPY/NOCOPY flag was added to the end of the string with ':'
as separators. The python script then split the line on ':'
which breaks on Windows build because the string was

[MEM]:[FILE]:[COPY]

In windows you will have 'c:\' in the file path so the
line.split() in script will split on the 'c:'.

Move the COPY/NOCOPY to:

[MEM]:[COPY/NOCOPY]:[FILE]

Note that the comments at top of gen_relocate_app.py also
indicates this format.

Fixes #43950

Signed-off-by: David Leach <david.leach@nxp.com>
2022-03-22 12:33:40 +01:00
Marin Jurjević 683868f3d2 net: lwm2m: fix potential invalid pointer dereference in reset message
Sometimes message is being reset from multiple locations in code.
If message has already been reset, pointer to context is invalid.

Signed-off-by: Marin Jurjević <marin.jurjevic@hotmail.com>
2022-03-22 12:33:31 +01:00
Cezar Burlacu 27da68cfb2 hwinfo shell: reset_cause fix
`reset_cause` with no arguments will print the device id.
Change it to print the reset cause.

Tested on nucleo_f767zi.

Signed-off-by: Cezar Burlacu <cezar@embeddedp.ro>
2022-03-22 12:33:11 +01:00
Mariusz Skamra e01e2235d3 Bluetooth: ascs: Fix ASE invalid state transition
This fixes issue where, the ASE went directly to QoS Configured state
when in Releasing state and the ISO link has been disconnected.

To not change the current behavior, the transition from Streaming state
has been unchanged, but rather fixed depending on the ASE direction.

Fixes: #44004
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-22 12:33:03 +01:00
Mariusz Skamra d0111f7f44 Revert "Bluetooth: gatt: ccc changed cb after connection cb"
This reverts commit 6bb75a53d1.
This fixes GATT that was uninitalized when application received
bt_conn_cb->connected callback. As the result, the bt_gatt_is_subscribed
was not working as expected when called from bt_conn_cb->connected.

The _bt_gatt_ccc->cfg_changed callback does not carry information about
the device that subscribed for notifications but rather is says the
app when it should start/stop broadcasting notifications.

This leads to the conclusion that the bt_gatt_ccc->cfg_changed can be
called before bt_conn_cb->connected callback.

Fixes: #42829
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-22 12:32:54 +01:00
Juha Heiskanen 0c6ea8eec4 net: lwm2m: Fix Read operation for /object
Read operation must return empty payload when read /object_id
if there is no created object instances.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-03-22 12:32:45 +01:00
Yonatan Schachter 9fdd905fa6 boards: arm: rpi_pico: Fix I2C compatible in docs
The documentation for rpi_pico used the wrong devicetree
compatible for I2C.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-03-22 12:32:38 +01:00
Mariusz Skamra cb28ffbc8b Bluetooth: has: Improve grouping of settings
Use menuconfig in order to give a better grouping of HAS related
settings with separate subpage.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-22 12:32:29 +01:00
Artur Hadasz 001894a1c0 ipc: use highest coop priority for workqueue in new IPC backend
The priority of workqueue responsible for rpmsg processing was too
low. Any cooperative task could cause rpmsg processing to be
slightly delayed.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2022-03-22 12:29:17 +01:00
Artur Hadasz 9f5c159c7c modules: hal_nordic: fixed wrong 802.15.4 NET core init level
The intialization level of 802.15.4 on NET core was set to APPLICATION,
which caused some applications to break during initialization. Changed
it to POST_KERNEL. CONFIG_NRF_802154_SER_RADIO_INIT_PRIO default value
was adjusted.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2022-03-22 12:29:01 +01:00
Andrzej Puzdrowski 5968fbdbe0 manifest: mcuboot update
Synch up to the upstream:
mcu-tools/mcuboot@4c0f6c177f

Update to the 1.9.0
- boot: Allow larger minimum flash write
- boot_serial: zephyr: Add optional timeout to enter serial recovery
- boot_serial: Adapted to Zephyr's new CRC APIs
- zephyr: Use a smaller sha256 implementation
- boot_serial: Added support for the  echo command
- single loader: fixed image decryption for any SoC flash
  of the pages size which not fitted in 1024 B

Plus a few fixes
- serial recovery: fixed echo command
- serial recovery: fixed possible output buffer overflow

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-03-22 12:00:20 +01:00
Dominik Ermel 5a4f5abc4d mgmt/mcumgr/lib: Fix CONFIG_IMG_MGMT_VERBOSE_ERR
The IMG_MGMT_VERBOSE_ERR Kconfig option has not been really working
since the SMP response that it would setup was reset in case of
error, so in any instance that it would actually be used.

Fixes #32545

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:40:19 +01:00
Dominik Ermel 41cc3f04a0 mgmt/mcumgr/lib: Add support for "rsn" in error SMP responses
The commit adds support for passing "rsn" explanation strings,
for "rc" code, in error SMP responses.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:40:19 +01:00
Dominik Ermel cbd48e1294 mgmt/mcumgr/lib: FS mgmt replace zephyr_fs_mgmt_truncate
The zephyr_fs_mgmt_truncate has been replaced with fs_unlink
since there is no point to specially check for file existence
before just removing it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:38:53 +01:00
Dominik Ermel a0d379a646 mgmt/mcumgr/lib: Fix return paths code style
Functions fs_mgmt_impl_read and fs_mgmt_impl_write have been missing
proper returns.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:38:53 +01:00
Dominik Ermel 02f355c541 mgmt/mcumgr/lib: FS management reduce duplicated "rc" setting code
The fs_mgmt_file_upload_rsp has been renamed fs_mgmt_file_rsp
and is used everywhere where "rc" code and "off" is placed into
response, instead of duplicating code that does the task.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:38:53 +01:00
Dominik Ermel aa0249ddd1 mgmt/mcumgr/lib: STAT mgmt: Remove stat_mgmt_get_group function
The function has been reimplemented within stat_mgmt_list directly,
reducing execution time and code size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:38:32 +01:00
Dominik Ermel 6314a9c6d8 mgmt/mcumgr/lib: Unify STAT group code
The commit merges Zephyr specific code from zephyr_stat_mgmt.c
to stat_mgmt.c, removes *_impl_* prototypes of functions that are
used for system specific implementations.
zephyr_ prefixes have been removed from identifiers as they are
no longer needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:38:32 +01:00
Dominik Ermel a3ec5b258c mgmt/mcumgr/lib: Start response container after request validation
The commit reorganizes smp_handle_single_payload function to only
open map container, in response, after request have been validated
to be processable.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:38:03 +01:00
Dominik Ermel 2a33947842 mgmt/mcumgr/lib: Remove unused arg param from mgmt_init_writer_fn
The commit removes arg parameter from mgmt_init_writer_fn
function typedef and implementation in zephyr_smp_init_writer.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:37:45 +01:00
Dominik Ermel 10f41622d2 mgmt/mcumgr/lib: Remove unused arg para from mgmt_init_reader_fn
The commit removes arg parameter from mgmt_init_reader_fn
function typedef and implementation in zephyr_smp_init_reader.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:37:45 +01:00
Dominik Ermel 88e2b4c768 mgmt/mcumgr/lib: Replace smp_init_rsp_hdr with smp_make_rsp_hdr
The smp_make_rsp_hdr prepares new response header from request
header, sets proper frame length to it and converts it to
network format.
Because a respose buffer has now pre-allocated space for header
it is no longer required to call the smp_make_rsp_hdr,
formerly smp_init_rsp_hdr, to reserve such space before adding
data that should follow it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:37:45 +01:00
Dominik Ermel d643a9c4ea mgmt/mcumgr: Reserve SMP header size on buffer initialization
The commit changes cbor_nb_writer_init function to reserve
SMP header size on init. The change makes call to
mgmt_streamer_reset_buf within smp_write_hdr no longer needed.
The mgmt_streamer_write_at function, that has been exclusively
used to write headers, have been replaced with mgmt_streamer_write_hdr
and zephyr_smp_write_hdr, formerly zephyr_smp_write_at, has been
reduced as it no longer needs to check and update net_buf metadata
to write header as the cbor_nb_writer_init does it now.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-22 11:37:45 +01:00
Vinayak Kariappa Chettimada 2214e39821 drivers: timer: nrf_rtc_timer: Dont__disable_irq if BT_LL_SW_SPLIT
Do not use __disable_irq when Zero Latency IRQs are enabled
and the Zephyr open source Bluetooth Controller is used with
Zero Latency IRQs support.

Application shall ensure their Zero Latency IRQ ISRs do not
invoke any kernel APIs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-22 11:36:28 +01:00
Vinayak Kariappa Chettimada 4eb5c375e1 drivers: timer: nrf_rtc_timer: Add Lock Zero Latency IRQs Kconfig
Add an explicit Kconfig option to enable use of
__disable_irq() in nRF RTC timer driver to prevent higher
priority contexts (including ZLIs) that might preempt the
handler and call nrf_rtc_timer API from destroying the
internal state in nrf_rtc_timer.

Relates to commit fcda8699cb ("drivers: timer: extend
nrf_rtc_timer").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-22 11:36:28 +01:00
Stephanos Ioannidis 095001cdd1 doc: Use :kconfig:option: domain role
Multiple usages of the :kconfig: role, which is now obsolete, was
merged in the PR #43053; update these to use the :kconfig:option:
domain role.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-03-22 01:14:31 -04:00
Jay Vasanth 7c65268f3e drivers: pwm: Microchp XEC PWM driver add PINCTRL support
Add build time optional PINCTRL support to common PWM driver
for Microchip XEC MEC15xx and MEC172x families.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-21 21:49:50 -04:00
Jay Vasanth 845c1185a2 drivers: pwm: Microchip XEC PWM add MEC172x support
Add support for MEC172x series to Microchip XEC PWM driver.
Standardize device tree properties for both SoC families.
Standardize device structure usage.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-21 21:49:50 -04:00
Steve Winslow 717853088c doc: Fix west spdx command docs formatting bug
Fixes #43993

Signed-off-by: Steve Winslow <steve@swinslow.net>
2022-03-21 21:43:01 -04:00
Ruibin Chang cebcaeed55 ITE drivers/kscan: use wakeup interface for WUC pins
Use wakeup interface for WUC pins in it8xxx2 kscan driver.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-03-21 16:35:03 -07:00
Ruibin Chang 4b75cf8f47 ITE drivers/interrupt_controller: add wuc interface
Add wakeup controller interface for ITE it8xxx2 chip.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2022-03-21 16:35:03 -07:00
Erwan Gouriou d66c1d9b54 drivers/adc: stm32: Update setup_channels() for G4 series
G4 series have specific LL ADC API that discriminate ADC1 and ADC5
channels. Take this into account in adc_stm32_setup_channels().

Additionally, fix this function to use LL defines as argument of macro
__LL_ADC_CHANNEL_TO_DECIMAL_NB, as good practice.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-21 16:31:27 -07:00
Erwan Gouriou ec4ef5b0ef dts/arm: stm32g4: Populate adc instances with temp and vref channels
vref and temp channels are only there on specific adc instances.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-21 16:31:27 -07:00
Robert Lubos fff22d3d7f doc: release: 3.0: Add release notes for networking
Add networking release notes based on the commit history.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-03-21 16:09:34 -07:00
Carlo Caione b53a429498 ipc_service: Fix API documentation
Fix some API documentation.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-03-21 19:15:02 +01:00
Emil Gydesen fb9e86f235 doc: Add BT L2CAP bt_l2cap_chan_state change to release notes
Add the change to enum bt_l2cap_chan_state to the release notes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-21 19:14:44 +01:00
Nirosharn Amarasinghe 3cdaf72d9d bluetooth: controller: Add ISO-AL TX unframed fragmentation
- Implemented ISO-AL TX interface functions for fragmentation of
  unframed PDUs
- Implemented ISO-AL source construct and its creation for an input
  data path

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2022-03-21 19:03:56 +01:00
Gerard Marull-Paretas c966a95718 mgmt: mcumgr: fix Kconfig option prompt
Boolean options must not start with "Enable...". Adjusted the prompt to
comply with the guidelines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 18:54:08 +01:00
Benjamin Björnsson ab6f5cf077 boards: arm: Add support for Arduino Nicla Sense ME
This commit adds support for the Arduino Nicla Sense ME board.
The board functionality has been tested using the samples:
- hello_world
- philosophers
- peripheral_dis
- spi_flash

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-03-21 18:37:05 +01:00
Dominik Ermel 92103b835b mgmt/mcumgr: Add optional packet re-assembly to BT transport
New CONFIG_MCUMGR_SMP_BT_PKASM has been added that enabled
SMP packet re-assembly, at transport level, to the BT.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-21 18:03:18 +01:00
Dominik Ermel a99118d140 tests/mgmt/mcumgr/smp_reassembly: Unit tests for re-assembly
The commit adds unit tests for SMP packet re-assembly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-21 18:03:18 +01:00
Dominik Ermel d0499d112a mgmt/mcumgr: Add packet re-assembly support
The commit adds packet re-asembly to SMP that can be used to
collect packet from fragments at SMP transport level.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-21 18:03:18 +01:00
Dominik Ermel fa71c9c9e8 mgmt/mcumgr/lib: Prepare mcumgr smp for logging
Commit adds configuration for logging from mcumgr SMP protocol
source, and registers logging module.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-21 18:03:18 +01:00
Harshil Bhatt 0e3e344391 samples: subsys: console: Fix typo in README file
Fixed typo in samples/subsys/console readme

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
2022-03-21 17:55:08 +01:00
Vinayak Kariappa Chettimada 70a1827fc1 Bluetooth: Controller: Use the received coding scheme for Periodic Sync
Use the received coding scheme when receiving Periodic
Advertising PDUs for correctly calculating the receive
chain delay and on-air PDU time.

Relates to commit 6911e7e1d8 ("Bluetooth: Controller: Use
the received coding scheme when scanning").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-21 16:09:38 +01:00