Commit graph

48192 commits

Author SHA1 Message Date
Vinayak Kariappa Chettimada
929dae8cad Bluetooth: controller: Add ISR cputime measurement
Adding ISR cputime measurement for Radio, LLL, ULL_HIGH and
ULL_LOW execution contexts.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-02 08:09:29 -05:00
Dominik Ermel
c8d1c3ba2c doc: releasenotes 2.5: Add notes on addition fs_file_t_init
The commit adds notes on addition on fs_file_t_init function and its
impact on File system API.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-02-02 07:36:44 -05:00
Laczen JMS
0e6a2e0390 drivers: eeprom simulator fix range error
This PR fixes a bug in the eeprom simulator making the last byte
part of the readable/writeable range

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2021-02-02 07:36:13 -05:00
Henrik Brix Andersen
2b8d9c584a tests: drivers: pwm: api: run PWM tests in user space
Run the PWM API tests in user space.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-02-02 07:18:50 -05:00
Giancarlo Stasi
5b025d0d9b soc: arm: stm32l4: Fix stm32 ll header list
PM stm32 ll header list was not adequate for L4 debug builds.
Add _system.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2021-02-02 07:18:16 -05:00
Henrik Brix Andersen
e9f386a62c doc: releases: 2.5: add EEPROM release notes for v2.5
Add EEPROM release notes for v2.5.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-02-02 07:17:49 -05:00
Andrzej Kaczmarek
ebb5b9a558 Bluetooth: shell: Fix 'bt per-adv-data'
ad_len parameter is not length of complete advertising data, but number
of bt_data structs passed to bt_le_per_adv_set_data - we pass only one.

Also memset target buffer before converting hex string so data shorter
than specified will be right-padded with zeroes instead of some
leftovers.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-02-02 07:15:40 -05:00
Peter Bigot
d91fd612a1 doc: release: 2.5: document deprecated littlefs Kconfig options
Note that Kconfig options related to the filecache memory pool have been
deprecated and replaced by a Kconfig option for configuring the
filecache heap size.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
Peter Bigot
1123f19689 tests: fs: littlefs: check simultaneous open limits are correct
Verify that we can open at least as many files, and at least as many
directories, as the configuration specifies.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
Peter Bigot
c167c96eb9 tests: fs: littlefs: test both default and non-default parameters
The file cache allocation infrastructure changes if multiple file
systems are present with different configurations.  Make sure both
allocation schemes are tested.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
Peter Bigot
487b0002cb tests: fs: littlefs: update filecache configuration
The mem_pool Kconfig API is deprecated as allocation now uses a k_heap.
Update to allocate a heap with the same amount of memory as was
defaulted with mem_pool customization.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
Peter Bigot
8ea2956ca3 fs: littlefs: revise how per-file cache memory is allocated
Originally the file cache used a mem_pool, but that data structure has
been deprecated and replaced by a heap that includes metadata in the
heap area.  As a result attempts to allocate all blocks will fail
because some of the reservation intended for cache data is now holding
metadata instead.

It's not immediately clear how to adjust the required heap size to
support this metadata as it depends on heap chunk units and data
structures that are not visible to the application.  Experimentally a
value of 24 bytes works, while smaller values do not.

Further the previous Kconfig API to configure the allocation pool is
completely inappropriate with the new heap data structure which has
such different behavior.

So: Deprecate the old Kconfig API.  Add a new Kconfig option to
directly control the cache size.  Infer a default cache size that
works with the old mem_pool parameters assuming a per-block overhead.
But to avoid wasted memory use the heap allocation only when the
application customizes the size, and use a slab in other cases.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
Peter Bigot
1ee82a1c9b doc: release: 2.5: note build-time resolution of device pointers
Document the existence of new API to retrieve device pointers at build
time.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-01 22:10:51 -05:00
Eugeniy Paltsev
97d40cbe12 tests: lib: cbprintf_fp: add filter for tests using newlib
As some tests are enabling CONFIG_NEWLIB_LIBC, we need to
filter out that tests in case of missing NEWLIB support
in toolchain.
It can be done with 'filter: TOOLCHAIN_HAS_NEWLIB == 1'
filter in testcase.yaml

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-02-01 22:07:45 -05:00
Mulin Chao
ddd73ca508 driver: espi: add more KBC 8042 support in npcx series.
This CL added more additional details for KBC (Keyboard and Mouse
Controller) bus in espi_event structure. It helps the application to
handle different 8042 events in the callback function.

The format of event data for KBC 8042 protocol is:
[23:16] - 8042 event type: 1: Input buf full, 2: Output buf empty.
[15:8]  - 8042 data: 8-bit 8042 data.
[0:7]   - 8042 protocol type: 0: data type, 1: command type.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-02-01 21:42:44 -05:00
Andy Ross
eb52f98305 release-notes-2.5: Note k_mem_pool removal
This is a removed API, should be called out here.  Also include a
behavioral note, as I don't think we did in release notes this when
k_heap was introduced.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-02-01 21:41:19 -05:00
Daniel Leung
dea8fccfb3 x86: clear GS at boot for x86_64
On Intel processors, if GS is not zero and is being set to
zero, GS_BASE is also being set to zero. This would interfere
with the actual use of GS_BASE for usespace. To avoid accidentally
clearing GS_BASE, simply set GS to 0 at boot, so any subsequent
clearing of GS will not clear GS_BASE.

The clearing of GS_BASE was discovered while trying to figure out
why the mem_protect test would hang within 10-20 repeated runs.
GDB revealed that both GS and GS_BASE was set to zero when the tests
hanged. After setting GS to zero at boot, the mem_protect tests
were running repeated for 5,000+ times without hanging.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-01 21:38:28 -05:00
Enjia Mai
8595a390a7 tests: msgq: Fix uncheck return value of coverity scan
Add a return value check of message queue test cases, to fix
issue #31680, which is for CID :216795.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-02-01 20:33:51 -05:00
Øyvind Rønningstad
0ab1372b7c boards: Fix usage of srec_cat -> ${SREC_CAT} in nrf
in TFM signing code in nrf9160 and nrf5340.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-01 16:33:39 -05:00
Jukka Rissanen
4c8760b299 net: tcp2: Properly cleanup receive queue
When pushing received data to the application, check that app
was able to receive the data. If the application already closed
the socket, then we must free the received net_pkt in order to
avoid memory leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-02-01 15:23:33 -05:00
Jukka Rissanen
de72faeb2c net: tcp2: slist API is not thread safe so use locking
Make sure we lock when accessing the slist, as it is not
a thread safe API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-02-01 15:23:33 -05:00
Jukka Rissanen
a5f9520428 net: tcp2: Cleanup properly if running out of mem
If we cannot allocate net_pkt or net_buf, then check this condition
properly and release other resources that were already allocated.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-02-01 15:23:33 -05:00
Peter Bigot
e9b5be36db soc: nordic: disable system power management on nRF53 network core
The network core doesn't have access to the regulators necessary to
support system power management.  That has to be done on the
application core.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-01 15:05:03 -05:00
Peter Bigot
0ef7be2f6f power: allow finer control of PM selection
Some targets, such as network cores on a multi-core SoC, do not
support system power management because they do not control the SoC.
Provide a flag that can be selected to inihibit enabling system power
management on those targets.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-01 15:05:03 -05:00
Peter Bigot
c72e2320e4 tests: exclude nrf5340dk_nrf5340_cpunet when CONFIG_PM=y
The required regulator control features are only available on the
application core.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-01 15:05:03 -05:00
Peter Bigot
5d2acb30eb Revert "soc: nordic: Disable PM for SOC_NRF5340_CPUNET_QKAA"
This reverts commit f38ba314ea.

nrf5340dk_nrf5340_cpunet doesn't support power management, but that
should be handled another way.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-01 15:05:03 -05:00
Guennadi Liakhovetski
3af94e7172 SOF: cAVS 1.5 needs reset-vector.S in the main image
APL ADSP doesn't boot with reset-vector.S in the bootloader,
move it over to the main application binary.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-01 14:47:31 -05:00
Detlev Zundel
8410a8cfa8 samples: display: lvgl: Fix README.rst
The commands still refer to the old directory name 'gui' instead of
'display'.

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
2021-02-01 12:33:00 -05:00
Jukka Rissanen
7ae54adc37 net: tcp2: Create a timer for connection establishment
We need to make sure that when listening a connection establishment,
the connection gets cleared if we do not receive final ACK.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-02-01 12:32:30 -05:00
Kumar Gala
80700039ce ci: restore number of workers
Restore number of workers to previous levels since we've used up
the amazon credits.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-01 11:39:29 -05:00
Rubin Gerritsen
fc140d8616 samples: bluetooth: Remove useless default_conn
The connection object is not used.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-02-01 08:38:54 -05:00
Nicolas LANTZ
942979b252 Bluetooth: Mesh: Fix fix mod_sub_get_vnd
pass cid instead of CID_NVAL in parameters of mod_member_list_get

Signed-off-by: Nicolas LANTZ <nicolas.lantz@ubicore.net>
2021-02-01 08:38:24 -05:00
Jian Kang
9dd0aa2eb2 boards: cavs15: change the signing command in flash.sh
Change the command that signing with rimage by flash script after
commitID:b553166a has been merged, that patch add a new option -D for
specify configuration, so update the command of this script.

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2021-02-01 08:37:50 -05:00
Vinayak Kariappa Chettimada
b8b946f37f Bluetooth: controller: Fix rx_demux scheduling for LOW_LAT_ULL
Fix the mayfly callee id for the rx_demux scheduling under
the LOW_LAT_ULL implementation. This could be causing
undefined mayfly execution behavior in nRF51x SoC.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-01 08:36:19 -05:00
Hake Huang
a50b69dfb7 drivers: mcux_flexcan driver errata
in NXP flexcan driver we need add ERRATA for
ERRATA 5461 and 5829, reproted in #31555

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-02-01 08:35:14 -05:00
Marcin Niestroj
3f1d1f5773 drivers: wifi: esp: suppress warning logs when socket was closed
Socket can be closed either by Zephyr or by peer. In the former case ESP
WiFi chip still notfies about closed socket, which currently results in
printing warning log:

  <wrn> wifi_esp: Link X already closed

Change level of this log from warning to debug, so that driver users are
not concerned about situation that is a normal behaviour.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-01-31 10:21:52 -05:00
Alexander Wachter
681173c9ed doc: releasenotes 2.5: Add CAN driver release notes
This commit adds the release notes for the 2.5 releas for
the CAN driver.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-01-31 10:21:15 -05:00
Jordan Yates
fb71ad5bb6 lora: sx12xx_common: force sleep on boot
Force sx12xx modems into sleep mode on boot. This is the default state
of the modem when not being used due to the TX/RX complete callbacks.
This reduces current consumption by 600uA before the modems are used
for the first time.

As sleep is the normal state after TX/RX when using the LoRa API, it is
garaunteed that this will not change the behaviour of application code.
LoRaWAN starts by calling Radio.Init(), which resets the modem, so any
sleep configuration we do here is discarded.

Fixes #31567.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-31 10:20:53 -05:00
Hayden Ball
893857b48a max17055: Fix current conversion from MAX17055 unit to milliamps
`SENSOR_CHAN_GAUGE_AVG_CURRENT` is currently treated as a capacity
by the MAX17055 driver, however the unit conversion is different
for current and must be calculated separately.

Add a separate method to convert a current reading to milliamps
from 1.5625 uV/R_SENSE units, instead of the 5uVH/R_SENSE conversion
that was previously used.

Tested by comparing value read and converted from MAX17055 with
value from an external power profiling kit.

Signed-off-by: Hayden Ball <hayden@playerdata.co.uk>
2021-01-30 10:45:39 -05:00
Torsten Rasmussen
ea2ab69cf5 scripts: compliance.py updated to support KconfigBasic
This commit lets the Kconfig compliance check run from top of current
git repo instead of only executing inside ZEPHYR_BASE.
This extends the usability of the Kconfig compliance check.

Together with this possibility, a KconfigBasic mode has been added which
will execute the same verification for symbols in the Kconfig tree but
will not check for undefined symbols outside Kconfig.

This is needed as running Kconfig undef check outside the tree in
non-Zephyr repos might pickup `CONFIG_` named symbols in other code.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-30 08:09:49 -05:00
Maciej Perkowski
941af213d3 twister: Use alternative test sorting when --device-testing
Change the sorting of test instances if --device-testing is used
within subsets. Test instances are sored depending on the context.
For CI runs the execution order is: "platform1-testA, platform1-testB,
..., platform1-testZ, platform2-testA, ...". For hardware tests, were
multiple platforms can run the tests in parallel, it is more efficient
to run in the order: "platform1-testA, platform2-testA, ...,
platform1-testB, platform2-testB, ..."
This can significantly reduce the tests execution time
for setups with multiple different platforms connected.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-01-30 08:00:36 -05:00
Daniel Leung
3740f60631 tests: mem_protect: use MP_NUM_CPUS instead of SMP
The test_mem_domain_migration test creates a new thread with
different priority based on whether SMP is enabled. This causes
an issue where SMP=y and MP_NUM_CPUS=1 where the spin_entry()
would spin forever (with k_busy_wait()) and not yielding since
it has cooperative priority. Fix this by using MP_NUM_CPUS to
figure out which priority to use, as it is valid configuration
to have SMP=y and MP_NUM_CPUS=1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-29 19:37:25 -05:00
Erwan Gouriou
95712bd498 samples/drivers/adc: Few fixes for use with twister
Add some changes to adc sample to enable valid verdict generation
using twister:
-Replace 'single_line' keyword with correct 'one_line'
-Remove parenthesis from the sample output to enable regex verdict
-Add timeout to save time in execution

Additionally, add support for disco_l475_iot1.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-29 16:57:04 -05:00
Erwan Gouriou
6a012301e6 drivers/adc: stm32: Use bitfield for multiple channels detection
For multiple channels detection, channels variable was compared with
the output of find_lsb_set which actually is a decimal number.
Since channel is a bitfield the comparison was not behaving as
expected (detecting several channels while only one channel was used).

Rework the code to use the already existing bitfield "index" for
the test.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-29 16:57:04 -05:00
Krzysztof Chruscinski
c07bb77247 drivers: uart: Clarity timeout in uart_rx_enable and add doxygen links
Timeout parameter was not definied clearly. Added clarification together
doxygen links to events used in the description.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-01-29 15:05:16 -05:00
Maureen Helm
1778e117d7 actions: Fix typo in twister action name
Replaces "Twsiter" with "Twister" in the associated GitHub Action name.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-29 14:22:25 -05:00
Joakim Andersson
c14da53772 Bluetooth: host: Remove the deprecated bt_conn_create_slave_le function
Remove the deprecated bt_conn_create_slave_le function.
This was deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
016b580beb Bluetooth: host: remove deprecated bt_conn_security function
Remove the deprecated bt_conn_security function.
This has been deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
58e4263efb Bluetooth: host: Remove deprecated connection create API functions.
Remove the deprecated connection create API functions.
These have been deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
6485a660fe Bluetooth: host: Remove the deprecated Advertising Types definitions
Remove the deprecated Advertising Types definitions.
These have been deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00