Initialize function has to fail when a call to get entropy fails.
TinyCrypt prng_init relies on a proper entropy data, so we need to
check if the driver return it properly.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Propagate driver error when getting entropy data when calling a
cryptographically secure random generator.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Remove soc/arm/st_stm32/stm32YY/flash_registers.h files.
Change register accesses in stm32 flash drivers to use FLASH_TypeDef
from modules/hal/stm32/stm32cube/stm32YYxx/soc/stm32xxxxxx.h.
Fixes#16235
Signed-off-by: Sarvesh Patkar <psarvesh314@gmail.com>
In order to better handle incoming data, wait() should return
the # of sockets with data returned by poll().
Based on this new return value, we can call mqtt_input() in a
smarter way.
Signed-off-by: Michael Scott <mike@foundries.io>
Now that mqtt_live() can send an EAGAIN message meaning: no ping
was generated, let's handle that in process_mqtt_and_sleep() by
skipping the call to mqtt_input() since no data will be expected.
Signed-off-by: Michael Scott <mike@foundries.io>
Users of mqtt_live() have no idea when it actually sends a ping.
As a result it's very hard to know when to use mqtt_input() to
process the incoming PINGACK.
Instead of returning a 0 result when a ping isn't generated in
mqtt_live(), let's return -EAGAIN.
Signed-off-by: Michael Scott <mike@foundries.io>
SMI TX is different than other controller features in that it does not
necessarily imply any software changes; whether SMI TX is supported
may be simply a matter of hardware calibration. This change supports
using the same software on chips that do or do not support SMI TX
depending on calibration.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
usb-device.h must be included only if CONFIG_USB_UART_CONSOLE is
defined, otherwise it is not used and will pull a lot of usb code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This patch introduces the periph to/from memory dma transfer
define new values for dma cells on client side
Signed-off-by: Francois Ramu <francois.ramu@st.com>
when DMA IP is enabled on stm32 series,
the heap size must be configured to large value
because of dma channels configuration.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patches defines constants from dma registers
depending on the dma configuration of the stm32 soc
Some devices have 6 or 7 or 8 dma channels per dma instance
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This checks if the DMA controller supports or not
the memory-to-memory transfers. For DMA Version1,
in the stm32f2xx, stm32f4xx, stm32f7xx series,
only DMA instance 2 is able to transfer mem-to-mem.
For other series, with DMA Version2, there is no such a limitation.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Overlooked dependency in commit 97de99adca ("console: kconfig: Have
CONSOLE_{GETCHAR,GETLINE} depend on UART_CONSOLE"). CONSOLE_GETCHAR and
CONSOLE_GETLINE select CONSOLE_HANDLER, which selects
UART_INTERRUPT_DRIVEN, which depends on SERIAL_SUPPORT_INTERRUPT.
Fixed some selects with unsatisfied dependencies in CI.
(CONSOLE_HANDLER also depends on SERIAL, but it's redundant, since it
already depends on UART_CONSOLE, which depends on SERIAL. This is
simplified in https://github.com/zephyrproject-rtos/zephyr/pull/22116.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The samd20 does not have hardware support for controlling the SS pin.
Declare a cs-gpio to be able to use the SS pin for samd20 xplained pro
board.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
This fixes a problem which appeared after bossac version was downgraded
to 1.7 which no longer accepts the -o/--offset parameter. Now the offset
is fed to bossac executable only if it's explicitly provided and not by
default.
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
'type: path' was added to edtlib for completeness in commit 23a5b4963b
("dts: edtlib: Add 'type: path' for path references"). gen_defines.py
crashes if it's ever used though, because it gets confused for a
'type: phandle-array'.
Ignore 'type: path' properties in gen_defines.py, like how
'type: phandle' and 'type: phandles' are currently ignored too.
(Note that gen_defines.py is only one possible user of edtlib.)
Fixes: #22197
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Adafruit Feather M0 and Adafruit Trinket M0 boards aren't set up
to use their defined flash partition table to generate the 0x2000
flash offset for code. This should be enabled by default as the
boards ship with a write-protected bootloader and code should be
flashed where it expected by default.
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Check with 'const:' that #address-cells is 1 and #size-cells is 0. That
way other values will get flagged by edtlib.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
dtc is only used for static analysis (producing warnings) of the
DeviceTree sources. This means that valid Zephyr firmware can sanely
be built without it.
For some users, for instance Windows users that are not permitted to
use Chocolatey, installing dtc is problematic and installing it is not
worth the DT warnings that it provides.
To make using Zephyr easier for these users we make using DTC
recommended and opt-out, instead of mandatory.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix#22188
Introduce config option to disable automatic acknowledge via
virtual wires on response to eSPI host suspend and reset warnings.
This will give the opportunity for eSPI slave systems that need to
perform preparations before reset or suspend.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Introduce a new counter API function for reading the current counter
value (counter_get_value()) and deprecate the former counter_read() in
favor of this.
Update all drivers and calling code to match the new counter API.
The previous counter driver API function for reading the current value
of the counter (counter_read()) did not support indicating whether the
read suceeded. This is fine for counters internal to the SoC where the
read always succeeds but insufficient for external counters (e.g. I2C
or SPI slaves).
Fixes#21846.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Make sure that we do not calculate terminating \n when comparing
the received data to sent data because the \n is not part of
the lorem_ipsum buffer.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that if we receive websocket data in small chunks,
the parsing and returning of data to caller is done properly.
Fixes#21989
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Move reset of channel status from after the destroy callback since the
after the destroy callback the memory should be assumed to be released.
Instead clear the channel status when the channel is created in
l2cap_chan_add. This way we don't rely on the memory given being set to
the correct value.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix ATT releasing the att structure back to the memory slab allocator
before the structure is actually ready to be released. The memory slab
allocator will write context data inside the freed slab which is
currently being overwritten by l2cap during channel teardown.
This manifests as an "Unable to allocate ATT context for conn" when
reconnecting with multiple connections.
Since the l2cap channel is embedded inside of the ATT context and l2cap
still has a valid referenc to the l2cap channel we need to release the
ATT context at a later time.
This should be fixed by implementing the channel destroy function and
releasing the channel there.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add the option to provide the destroy callback to the fixed channels.
This can be used to free the memory for the L2CAP channel context which
is provided by the fixed channel in the accept callback.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This sample keeps failing in CI due to some SMP issues currently being
addressed. Exclude until we have a fix.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
So far, nRF 802.15.4 radio driver build was dependent on the 802.15.4
subsystem in Zephyr. While this was a reasonable approach for samples,
it prevented the radio driver from being built as a standalone entity,
which could be useful in some applications (e. g. running core nRF
802.15.4 radio driver tests with Zephyr).
Resolve this, by providing a separate set of Kconfigs for the radio
driver, therefore allowing to build it as a separate entity. The 802154
subsystem simply enables the radio driver module in this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sample app compiled with the GSM modem driver enabling PPP.
This sample was tested with a Reel Board UART_1 connected via the
external board/connector and a FONA 808 modem. Reel board specific
suppor is found in boards/.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>