Commit graph

53670 commits

Author SHA1 Message Date
Mahesh Mahadevan c3567c6f33 tests: arch: arm_irq_vector_table: Update to run on MXRT685
Fix for Issue#35658.
Update the custom vector table to add the OS Event timer
interrupt which is used on RT685 as the kernel system timer

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-07 08:25:06 -04:00
Chih Hung Yu 0ef77d4ea4 kernel: Fix negative mutex lock_count value
If you try to unlock an unlocked mutex, it will incorrectly
succeeds and decreases the lock count to -1.

Fixes #36572

Signed-off-by: Chih Hung Yu <chyu313@gmail.com>
2021-07-06 19:19:41 -04:00
Krishna Mohan Dani 4c38ca1625 drivers/flash: stm32: Gets maximum erase time from device tree
This commit removes the huge if condition section and is
replaced with DT APIs to get the maximum erase time of a
stm32 flash from dtsi.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-06 19:02:19 -04:00
Krishna Mohan Dani ea9d21e39d dts/arm: Adding max-erase-time element to dtsi
This commit adds max-erase-time element which holds the
maximum erase time of a sector or page or half-page for
all the series of stm32.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-06 19:02:19 -04:00
Krishna Mohan Dani 21c74c6a50 dts/bindings: Adding max-erase-time for dt usage
This commit defines max-erase-time element inside flash-controller
to be part of device tree.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-06 19:02:19 -04:00
Vinayak Kariappa Chettimada b81cecf8df Bluetooth: Controller: Use define for offset unit and SCA calculation
Use defines for offset unit and for calculation of Periodic
Advertising window widening using clock accuracy value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-06 18:51:51 -04:00
Vinayak Kariappa Chettimada 6684af11b9 Bluetooth: Controller: Fix clock accuracy calculation scanning Aux PDU
Fix clock accuracy value used in the calculation of window
widening applied when scanning for auxiliary PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-06 18:51:51 -04:00
Sidhdharth Yadav 2022240fea samples: drivers: nucleo_l552ze_q: Configuring ADC sample application
This commit configures ADC sample application using overlay. The ADC
sample has been tested in nucleo_l552ze_q platform.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav de35942887 samples: drivers: stm32l562e_dk: Configuring ADC sample application
This commit configures ADC sample application using overlay. The ADC
sample has been tested in stm32l562e_dk platform.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav 24977d41c5 tests: drivers: STM32: Enabling ADC tests in nucleo_l552ze_q
This commit enables test_adc to build and run in nucleo_l552ze_q
platform.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav 63114b5365 tests: drivers: STM32: Enabling ADC tests in stm32l562e_dk
This commit enables test_adc to build and run in stm32l562e_dk
platform.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav bdf425cd5c drivers: adc: Adding CONFIG_SOC_SERIES_STM32L5X in stm32l5 series
Allowing ADC to build in stm32l5 series.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav bfa5427b12 boards: arm: nucleo_l552ze_q: Enabling ADC support in device tree
This commit enables ADC support in nucleo_l552ze_q platform in
device tree.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav c691b50420 boards: arm: stm32l562e_dk: Enabling ADC support in device tree
This commit enables ADC support in stm32l562e_dk platform in
device tree.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Sidhdharth Yadav d5d3be5f83 dts: arm: STM32: Enable ADC1 & ADC2 support in stm32l5 in dtsi
This commit adds ADC1 & ADC2 support in dtsi for stm32l5 series.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-07-06 18:03:22 -04:00
Aurelien Jarno 2a96cc0347 drivers: adc: STM32: fix support for internal voltage reference source
Commit c045cbd336 added support for internal voltage reference source,
but in practice only the temp sensor is supported. Fix that.

Also change the code to keep the existing paths so that VREFINT and
TEMPSENSOR can be used at the same time.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-07-06 18:01:57 -04:00
Pavlo Hamov 6a1416d0c2 soc: arm: cc32xx: Override Reboot implementation
Support cold, hot reboots. Cold will reboot all periherals

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-07-06 15:22:39 -05:00
Tomasz Michalec becfed481e drivers: i2c: emul: Link emulators to correct bus
Fix i2c emulated bus initialisation code to use children of specific i2c
bus DTS node instead of first i2c bus instance.

Signed-off-by: Tomasz Michalec <tm@semihalf.com>
2021-07-06 15:19:40 -05:00
Evgeniy Paltsev fbc9fbf92f ARC: save/restore accumulator registers on all ARCv2 HS CPUs by default
Accumulator registers (ACCL, ACCH) are used on HS CPUs not only
in case of FPU usage but also in case of MPY usage. We enable MPY
for all ARCv2 HS in commit
18a24c3f6 ARC: gcc-m-cpu: use -mcpu=archs as a default for ARCv2 HS
but we didn't enable accumulator registers management.

Let's enable accumulator registers save/restore on all ARCv2 HS CPUs
by default.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-07-06 15:17:26 -05:00
Watson Zeng c6fcdc24ac arch: arc: update ARConnect ICD select mask when new cpu come online
The ARConnect Inter-core Debug Unit (ICD) provides additional
debug assist features in multi-core scenarios. It's useful to halt
other cores when one core is halted.

Before we program ICD in master core(core 0) initial stage, add
all cores to mask. so we need to make sure other slave cores have
launched and in running mode before we enable ICD in master core.

If we launch master core first, then launch slave cores by master
core conditionally, in this scenario, it's not OK.

Let's update arc connect debug (ARConnect ICD) select mask
when new slave core come online by slave core self, instead of
use hardcoded select mask.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-07-06 15:10:39 -05:00
Dario Binacchi c3a067e841 drivers: adc: stm32: fix f3x series
The patch fixes driver compile errors and ADC management for the f3x
series. It was developed and tested for the stm32f373 variant.

Tested-by: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Dario Binacchi <dariobin@libero.it>
2021-07-06 15:08:04 -05:00
Fabio Baltieri c32a96af6a boards: nucleo_wl55jc: enable power management support
Enable lptim1 and configure the suspend power state for nucleo_wl55jc.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-07-06 09:51:22 -04:00
Fabio Baltieri 2fc87f961b soc: stm32wl: add power management support
This adds power management support for the STM32WL series.

Suspend-to-idle is mapped to the three stop states (wake up from any
EXTI, including LPTIM), and soft-off can trigger either standby or
shutdown (wake up in reset).

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-07-06 09:51:22 -04:00
Fabio Baltieri 9c82898127 drivers: stm32_lptim_timer: add support for STM32WL series
Add the lptim1 device node definition and enable the corresponding
exti interrupt in sys_clock_driver_init().

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-07-06 09:51:22 -04:00
Michael Hope 5d55730cf6 libc: minimal: add size optimized string functions
The current implementations of memcpy and memset are optimized for
performance and use a word based loop before the byte based loop.

Add a config option that skips the word based loop. This saves 120
bytes on the Cortex-M0+ which is worthwhile on small apps like a
bootloader.

Enable by default if SIZE_OPTIMIZATIONS is set.

Signed-off-by: Michael Hope <mlhx@google.com>
2021-07-06 07:40:38 -04:00
Anas Nashif 395b0c3a24 Revert "Bluetooth: samples: Add ISO connected benchmark sample"
This reverts commit 94338c1640.

This is currently failing in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-07-05 21:56:09 -04:00
Anas Nashif 0898388080 Revert "drivers: ieee802154: configure IE header injection for nRF5"
This reverts commit bde592e91a.

This is causing build failures. Original PR #36008.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-07-05 18:54:35 -04:00
Piotr Pryga c1cff75589 samples: Bluetooth: df_tx: Add information about nRF5340 to README.rst
Add information about support of nRF5340 SOC in the sample
README.rst.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-07-05 14:46:49 +03:00
Piotr Pryga cd71b07d89 samples: Bluetooth: df: Move BLE controller conf into board specific file
Move configuration related with BLE controller into board specific file.
That is required to allow building the sample for nRF5340 where BLE
controller is not part of the sample image.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-07-05 14:46:49 +03:00
Piotr Pryga 8237c21c1a samples: Bluetooth: df_rx: Add information about nRF5340 to README.rst
Add information about support of nRF5340 SOC in the sample
README.rst.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-07-05 14:46:11 +03:00
Piotr Pryga a25764b19c samples: Bluetooth: df_tx: Add config for support the nRF52820
Add required configuration and DTS overlay for support the nRF52820 SOC.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-07-05 14:36:39 +03:00
Kamil Piszczek bd7d28ef7d bluetooth: services: hrs: use template for logging configuration
Use template for logging configuration in Bluetooth HR service.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2021-07-05 14:34:25 +03:00
Kamil Piszczek dd5a0d1997 bluetooth: services: hrs: add characteristic permission config
Added a configuration of characteristic access permissions for
Bluetooth Heart Rate service.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2021-07-05 14:34:25 +03:00
Chris Pearson 52837aaa49 Bluetooth: samples: Correct "Heart Rate" comment
This is a simple comments fix. This sample code is for the
"Health Thermometer Service", but at one location the comments read
"Heart Rate Service".

The change replaces "Heart Rate" with "Health Thermometer".

Signed-off-by: Chris Pearson <ctpearson@gmail.com>
2021-07-05 14:33:27 +03:00
Tim Lin 91a6b286c9 ITE: drivers/i2c: it8xxx2: add mutex lock
Add mutex lock to prevent race conditions.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-07-03 08:03:10 -04:00
Gerson Fernando Budke fe505d3d5e boards: arm: cy8ckit_062_ble: Move shared to common
Move shared resources from m0 to common.  This enable shared hardware
definition between the two cpu cores.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-07-02 22:50:29 -04:00
Gerson Fernando Budke ac8570f7c8 soc: arm: cypress: psoc6: Enable Cortex-M4
Configure Cortex-M0+ to start Cortex-M4 CPU.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-07-02 22:50:29 -04:00
Robert Lubos 6d366093c8 net: sockets: socketpair: Rename read/write signals
Rename `write_signal` to `readable` and `read_signal` to `writeable`
which are more meaningful to the actual states they represent, and make
the code analysis easier.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-07-02 22:22:42 -04:00
Robert Lubos e415518f5f net: sockets: socketpair: Fix poll signalling
In case read or write were called before the actual poll() call, the
poll() function was not signalled correctly about such events, which in
order could lead to a deadlock if the poll() was called with infinite
timeout.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-07-02 22:22:42 -04:00
Robert Lubos f6a2d3ac7a tests: net: socketpair: Verify that poll is signalled correctly
Add unit tests which verifies that poll() function is signalled
correctly if called after data was written/read to/from a socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-07-02 22:22:42 -04:00
Abe Kohandel d6314fa456 bluetooth: ots: Add object name write capability
Add the ability to perform a write on the object name GATT
Characteristic with a notification callback to the application
that the name has been written.

In order for this operation to work the memory backing the
object name must be modifiable. To prevent forcing the user
to always allocate 120 bytes for the name, the maximum name
length is changed from a define to a configuration parameter.

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2021-07-02 22:22:24 -04:00
Patrick Rathje cb6ef1328b Bluetooth: L2CAP: Fix missing net_buf_unref()
In case of non-recoverable errors (e.g. the connection breaks while
transmitting), the l2cap_chan_tx_process deques the net_buf but does
not unreference it. As this is inside a work queue thread, the sending
thread gets no information on this error, relying on the tx_process to
ultimately free the buffer.

Signed-off-by: Patrick Rathje <git@patrickrathje.de>
2021-07-02 22:22:02 -04:00
Jordan Yates fb76f47f86 flash: spi_nor: convert to spi_dt_spec usage
Converts the spi_nor flash driver to use `spi_dt_spec` as a
demonstration of the simplifications that the API enables.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-07-02 21:34:16 -04:00
Jordan Yates 2946a535a0 spi: struct spi_dt_spec helpers
Add helper functions to simplify the usage of `struct spi_dt_spec`.
Implements helpers for the standard synchronous calls (transceive, read,
write).

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-07-02 21:34:16 -04:00
Jordan Yates dcc04d9abd spi: introduce struct spi_dt_spec
Introduces the `struct spi_dt_spec` type, which contains the complete
SPI bus information derived from devicetree. It serves the same purpose
as `struct gpio_dt_spec` in that it can be constructed automatically in
`DEVICE_DT_INST_DEFINE` macros and provided as a single handle to SPI
API calls. Includes a single function, `spi_is_ready` that validates all
SPI bus dependencies are ready.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-07-02 21:34:16 -04:00
Jun Lin 55f21ab846 drivers: PS/2: npcx: Replace device_get_binding with DEVICE_DT_GET
Replace device_get_binding() with DEVICE_DT_GET to obtain the PS/2
controller and clock control device objects. It helps to improve the
efficiency for driver initialization as DEVICE_DT_GET is processed
at the link time rather than run time.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2021-07-02 15:41:28 -04:00
Jun Lin 9d5da14a33 CODEOWNERS: PS/2: npcx: add owners for npcx PS/2 driver
Add Nuvoton developers as code owners for npcx PS/2 driver.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2021-07-02 15:41:28 -04:00
Jun Lin ba39c47187 driver: PS/2: npcx: add driver support for Nuvoton npcx family
The PS/2 module in npcx provides a hardware accelerator mechanism
including an 8-bit shift register, a state machine, and control logic
that handle both the incoming and outgoing data. The hardware
accelerator mechanism is shared by 4 PS/2 channels. To support it,
this CL separates the PS/2 driver into channel and controller drivers.
The controller driver is in charge of the PS/2 transaction. The channel
driver is in charge of the connection between the Zehpyr PS/2 API
interface and controller driver.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2021-07-02 15:41:28 -04:00
Krzysztof Chruscinski 8e4d9ae2e8 samples: shell: shell_module: Add shell bypass demo command
Add command which presents bypass functionality.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-07-02 13:35:18 -04:00
Krzysztof Chruscinski e05aa6dc3e shell: Add option to bypass shell
Added api call that can set a callback that is called whenever
data is received on shell. When callback is set, shell processing
is bypassed and data is passed to that callback.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-07-02 13:35:18 -04:00