Commit Graph

55371 Commits

Author SHA1 Message Date
Flavio Ceolin 93e674e373 docs: pm: Fix system pm diagram
The device pm actions (low_power or suspend) were switched. Also,
added SOFT_OFF to the suspend action.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-24 22:29:34 -04:00
Flavio Ceolin 7aa6fe148e pm: system: Suspend devices on STATE_SOFT_OFF
Suspend devices when the system goes to STATE_SOFT_OFF.
This state was not triggering any device power management. This should
at least suspend devices as it is done for SUSPEND_TO_RAM and
SUSPEND_TO_DISK.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-24 22:29:34 -04:00
Maureen Helm 4aec077d17 tests: drivers: Extend dma channel link test to mimxrt1064_evk board
Adds mimxrt1064_evk to the list of allowed platforms for the dma channel
link test.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-08-24 22:15:19 -04:00
Maureen Helm 3021c273de boards: arm: Enable dma driver on mimxrt1064_evk
Enables the dma driver on the mimxrt1064_evk board. The board
documentation is not updated because it already mentions dma driver
support.

Tested with:
  - tests/drivers/dma/chan_blen_transfer
  - tests/drivers/dma/chan_link_transfer
  - tests/drivers/dma/loop_transfer

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-08-24 22:15:19 -04:00
Maureen Helm 6985bc9c1d boards: arm: Enable watchdog driver on mimxrt1064_evk
Enables the watchdog driver on the mimxrt1064_evk board. The board
documentation is not updated because it already mentions watchdog driver
support.

Tested with tests/drivers/watchdog/wdt_basic_api

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-08-24 22:14:44 -04:00
Erwan Gouriou f6eb6938a9 west.yml: update revision modules/hal/stm32/hal_stm32
stm32cube: update stm32f1 to version V1.8.4
stm32cube: update stm32f2 to version V1.9.3
stm32cube: update stm32f4 to version V1.26.1 V1.26.2
stm32cube: cleanup stm32f7 version V1.16.1
stm32cube: update stm32g0 to version V1.5.0
stm32cube: update stm32wl to version V1.1.0
stm32cube: update stm32f0 to version V1.11.3
stm32cube: update stm32f3 to version V1.11.3
stm32cube: update stm32l0 to version V1.12.1
stm32cube: update stm32l1 to version V1.10.3
stm32cube: update stm32wb to version V1.12.0
(including ble library update)
stm32cube: common_ll: Regeneration after cube updates

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 22:14:20 -04:00
Alexandre Bourdiol 4b7e9368bc drivers: spi: spi_ll_stm32: not all stm32l1 MCU have SPI_CR2_FRF
After update of stm32 cube l1 V1.10.3,
SPI_CR2_FRF doesn't exist for all stm32L1 MCU,
thus LL_SPI_SetStandard() is also not defined for all stm32l1 MCU.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-08-24 22:14:20 -04:00
Erwan Gouriou 3e2672b13f drivers/clock_control: stm32: STM32WB: No HSE by-pass
HSE by-pass capability is not available on STM32WB.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 22:14:20 -04:00
Alexandre Bourdiol f7d21d5d39 dts: arm: st: wb: no HSE bypass capability
STM32WB has no more HSE bypass capability but still has HSE capability

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-08-24 22:14:20 -04:00
Alexandre Bourdiol 29d1e90a8d drivers: bluetooth: hci: ipm_stm32wb: macro renamed CFG_BLE_OPTIONS
Adapt to stm32hal stm32wb cube update v1.12.0

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-08-24 22:14:20 -04:00
Hake Huang cc760c5401 sample: usb: hid-cdc: add a sleep for cpu to response
add a sleep while the uart init is fail.
so cpu will have chance to output error message

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-08-24 16:37:44 -05:00
Johann Fischer 741ae93ce2 shell: remove Kconfig option CONFIG_UART_SHELL_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Now we can also remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-24 17:15:58 -04:00
Toby Firth 893bfc0fc1 drivers: counter: added ctimer driver for lpcexpresso55s69
Added shim driver for the CTIMERs for the lpcexpresso55s69 board.

Fixes: #22705

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2021-08-24 17:13:22 -04:00
Martí Bolívar 7355204f41 samples: lvgl: add min_ram to adafruit_2_8_tft_touch_v2 test
Commit c79b1a38aa ("samples: display:
Convert driver and lvgl sample.yaml to use depends_on") started using
depends_on in the sample YAML for a lvgl application instead of
platform_allow.

This breaks build testing with twister and overflow checking enabled
on more resource constrained platforms. The test case's .config
ends up with:

    CONFIG_LVGL_HOR_RES_MAX=320
    CONFIG_LVGL_VER_RES_MAX=240
    CONFIG_LVGL_VDB_SIZE=64
    CONFIG_LVGL_BITS_PER_PIXEL=24

And lib/gui/lvgl/lvgl.c, where we allocate a buffer of size:

    (CONFIG_LVGL_BITS_PER_PIXEL *
     ((CONFIG_LVGL_VDB_SIZE * CONFIG_LVGL_HOR_RES_MAX *
       CONFIG_LVGL_VER_RES_MAX) / 100)
     / 8)

Require 147456 bytes to build the sample, ultimately overflowing RAM
if you run something along the lines of:

    twister -T samples -p <constrained_platform> --overflow-as-errors

This is a reasonable test to be doing to make sure that sample RAM
requirements do not get too big for a subset of platforms that are of
interest, and it no longer works.

To fix it, add a min_ram line for this case so that we can still run
overflow tests on a large set of samples without fine-grained special
casing or creating an ever-growing list of platform excludes for this
test.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-24 15:40:06 -04:00
Martí Bolívar cd0abb34ca doc: twister: add units to min_ram, min_rom
The units for these testcase YAML fields are missing, making it
unclear how to use them. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-24 15:40:06 -04:00
Maksim Masalski fa97ed2771 docs: getting started guide 3rd party toolchains fixes
Using 3rd Party Toolchains page find out that warning message
can be moved to the top of the page.
Add Windows example in OneAPI.
Style fixing.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2021-08-24 15:38:47 -04:00
Aurelien Jarno 698a28663c drivers/sensor: Add basic Silabs Si7210 support
This adds basic support for the Silabs Si7210 hall effect magnetic
position and temperature sensor. It is able to get magnetic field and
temperature in the default scale of the sensor (depending on the
variant). It also supports going into sleep mode without measurements
through the device power management infrastructure.

It is most notably missing support for scale change, measurement
averaging and filtering, and alert pin configuration (threshold,
hysteris, tamper).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-08-24 10:16:19 -05:00
Vojislav Milivojevic fcfb1d9872 drivers: sensors: fix of sensor channel get for z axis
the correct value is returned when using sensor channel get function to
read z-axis value

Signed-off-by: Vojislav Milivojevic <milivojevicvoja@yahoo.com>
2021-08-24 09:40:26 -05:00
Vinayak Kariappa Chettimada e4ed1d32be Bluetooth: Controller: Schedule LLL prepare before scan train code
Move the implementation of scan trains after call to LLL
prepare, so that LLL prepare executes without any latency.

To increase radio utilization, LLL prepare should be
scheduled as early in the `ticker_cb` of the radio event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:35:59 -04:00
Vinayak Kariappa Chettimada 7d1404a717 Bluetooth: Controller: Fix return value for unassigned aux context
Fix the return value use to indicate unassigned auxiliary
context when scanning is using LLL scheduling. This can
happen only under LLL scheduling where in LLL auxiliary
channel PDU reception has been spawn from LLL primary
channel scanning and on completion will join back to resume
primary channel PDU scanning.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:35:24 -04:00
Vinayak Kariappa Chettimada 01393382d7 Bluetooth: Controller: Update AD Data PDU allocation configurability
Update the calculation for configurable amount of shared
PDUs across advertising sets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:33:48 -04:00
Vinayak Kariappa Chettimada 41bb453948 Bluetooth: Controller: Keep the default AD Data length to 31 octets
Keep the default AD Data length to Bluetooth Specification
defined minimum of 31 octets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:33:48 -04:00
Vinayak Kariappa Chettimada 6c9a54c533 tests: Bluetooth: bsim: Minor re-arrange Kconfig in prj file
Re-arrange Host Kconfigs to group about Controller Kconfigs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:33:48 -04:00
Naiyuan Tian bc3fda491f kernel: userspace: fix typo in the comments
While reading the code, found some typos in the code comments,
line 226 and 668.
Fix comments to make it more solid.

Signed-off-by: Naiyuan Tian <naiyuan.tian@intel.com>
2021-08-24 07:31:49 -04:00
Ruibin Chang 2877bdcdfe ITE drivers/watchdog: reduce interval of warning timer
Reduce interval of warning timer, so we can print more
warning messages (ex. MEPC, task ID...) before watchdog reset.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2021-08-24 07:31:08 -04:00
Ruibin Chang f2b9ba1b2c ITE drivers/timer: add disable event timer control
We add disable event timer at the beginning of critical section
for two reason:
1.For K_TICKS_FOREVER case: since no future timer interrupts
are expected or required, so we disable the event timer.
2.Others case: according it81202 spec, when timer enable bit
from 0->1, the timer will reload counts and start countdown.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2021-08-24 07:30:47 -04:00
Emil Gydesen fc33f6af3a Bluetooth: sample: Update iso_broadcast_benchmark to use new ISO API
Update the sample to use the new ISO API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Emil Gydesen 1d1cd57c41 Bluetooth: sample: Update iso_broadcast to use new ISO API
Update the sample to use the new ISO API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Emil Gydesen 76091850c5 Bluetooth: sample: Update iso_connected_benchmark to use new ISO API
Update the sample to use the new ISO API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Emil Gydesen 23f3aa12ae Bluetooth: sample: Update central_iso to use new ISO API
Update the central_iso sample to use the new ISO API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Emil Gydesen 7037b11e1a Bluetooth: shell: Update ISO shell to new API
Update the ISO shell commands to use the new
ISO API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Emil Gydesen c47dae8c6d Bluetooth: ISO: Update connected ISO API
Update the connected ISO API to be more
similar to the broadcast ISO API as well
as the HCI spec.

This updated API allows for more flexibility
and will better support scenarios such as true
wireless setup, as ISO channels and connections
are more independent now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Vinayak Kariappa Chettimada c74fe1f009 Bluetooth: Controller: Fix scan window resume after extended scan
Fix implementation to not to put back the primary channel
scanning to resume state when Extended Scan has used ULL
scheduling which pre-empts the scan window.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:27:35 -04:00
Andrzej Głąbek 72e3bfe1c0 soc: nordic_nrf: Add Kconfig options for APPROTECT handling
Add Kconfig options that allow users to select the way the APPROTECT
mechanism is handled in the SystemInit() function.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-24 07:27:12 -04:00
Lauren Murphy bdae9399be samples: tflite-micro: fix magic_wand
Fixes accelerometer_handler.cc to import correct header
with TfLiteStatus since c_api_internal.h file was deleted in
the new standalone tflite-micro repo.

Removes import of version.h in main_functions.cc to match
tflite-micro version.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Lauren Murphy 82f64e1f20 samples: tflite-micro: update hello_world
Updates tflite-micro hello_world sample code.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Lauren Murphy 6cf73956c8 modules: tflite-micro: fix cmakelists.txt
Adds *_common.cc files to fix undefined references during build
of updated samples. Remove unnecessary LICENSE files. Remove
unnecessary header files in zephyr_library_sources().

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Lauren Murphy 6fd1b02496 docs, samples: tflite-micro: change tensorflow to tensorflow lite micro
Changes name of folder from tensorflow to tflite-micro and updates docs
to reference TensorFlow Lite Micro specifically instead of TensorFlow.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Lauren Murphy 804285ae63 modules: update tensorflow to tflite-micro
Updates west manifest and module folder name to point to new
TensorFlow Lite Micro repo Google recently pulled out of
the TensorFlow repo.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Maksim Masalski e02c7bd466 libc: types: suppress deviation
Suppress violation, because it is a deliberated deviation.
Noticed, that my previous PR #36420 comments were not correctly
detected by a static analysis tool. Only the first one item
"MISRAC2012-RULE_20_4-a" was detected and suppressed.

Change comment style, so each item will be suppressed.
Comment style defined in PR #36911 as the most suitable
for the analysis tool.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2021-08-24 07:23:02 -04:00
Jingru Wang cd87366016 cmake: emu: nsim: Allow all nsim platform use mdb
Currently the default runner of nsim_hs_smp is mdb,
the runner of other nsim platform is nsimdrv, user
can't change the default runner unless he uses
west command(--runner).

With this change cmake will choose runner according
to BOARD_DEBUG_RUNNER or BOARD_FLASH_RUNNER. so if
add -DBOARD_FLASH_RUNNER=mdb-nsim or
-DBOARD_DEBUG_RUNNER=mdb-nsim to cmake command,
the apllication will be run with mdb.

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2021-08-24 07:22:22 -04:00
Erwan Gouriou f1c8fcac8b dts/arm/seeed: lora-e5: Update hse clock configuration
Following change of HSE clock binding, remove hse-bypass
which is no longer an option and replace it with hse-tcxo
which is the configuration closest to previous status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 07:19:12 -04:00
Erwan Gouriou 267b5d2c95 west.yml: hal_stm32: Add fixup on STM32WL Utils LL API
Make use of https://github.com/zephyrproject-rtos/hal_stm32/pull/111

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 07:19:12 -04:00
Erwan Gouriou d40910097a drivers/clock_control: stm32wl: Consider new options for HSE clock
On STM32WL, HSE clock can take 2 specific options:
-hse-tcxo
-hse-div2
Enable support for these options.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 07:19:12 -04:00
Erwan Gouriou 05fbf578ff dts/arm/st: wl: Update compatible for hse clock
Use dedicated HSE clock binding for stm32wl series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 07:19:12 -04:00
Erwan Gouriou 7406ad8553 dts/bindings: Add binding for STM32WL HSE Clock
STM32WL features a specific HSE clock with dedicated properties.
Add a dedicated binding and update STM32 clock control driver
header to take it into account.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 07:19:12 -04:00
Anas Nashif eef51a8958 doc: kernel: move meta-irq doc to threads
Move this to where priorities are being discussed to keep things in
context and to have all priority types documented in 1 place.

Fixes #21648

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-08-24 06:59:13 -04:00
Alberto Escolar Piedras 9249609071 boards: bsim: fix bug with single settings file for few bsim devices
Reapply the part of 4b5cd92312
that added new functionality/fixed the actual issues described
in the original commit message withtout the further cleanup.

There was also some cross-commit content from
2b91ebe16e
as part of the cleanup in test_friendship.c which is also included.
+ added cleanup also to test_provision.c on request from Aleksandr.

Original commit msg:
-----------
Multiple bsim devices cannot store individual settings
with the existing settings backend for bsim.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
-----------

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2021-08-24 12:37:51 +02:00
Alberto Escolar Piedras 26d7d7c8c8 Revert "boards: bsim: fix bug with single settings file for few bsim devices"
This reverts commit 4b5cd92312.

global_device_nbr is used by many bsim tests.
And many of those are now off tree in preparation of the LE-Audio
work. Removing this for cleanliness now is not nice on others.
=> Revert

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2021-08-24 12:37:51 +02:00
Aleksandr Khromykh 2b91ebe16e test: Bluetooth: Mesh: test replay attack on ble mesh rpc
The test checks the resistance of ble mesh stack to replay attack.
Replay protection cache shall store seqAuth last frames.
Device shall filter out such messages on the transport layer.
Power on\off sequence shouldn't impact that
since replay protection cache is stored in settings subsystem.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2021-08-23 18:55:53 -04:00