TF-M only suports floating point in IPC model, not the SFN model.
Since floating point is a basic feature of the architecture and TF-M
has the limitation it makes more sense for the dependency to exist in
TF-M and and limit the TF-M model choice instead of limiting the
option to enable floating point.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add support for the WeAct Studio STM32G431 Core board. Note that this
board does not support USB-C PD in its default configuration. See the
board documentation for the necessary hardware reconfiguration.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Add support for the WeAct Studio STM32G431 Core Board.
Tested with:
- `samples/basic/blinky`
- `samples/basic/button`
Flashed samples using dfu-util.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Those configuration settings should never be part of driver Kconfig file.
Drop them, since they can easily result in Kconfig symbol circular
dependency error.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Fix the CMakeLists of the tls_credentials and sockets folders
to link/interface to the net library instead of the zephyr library.
This fixes issues where some files are not found in the link interface
when compiling the sources in this folder.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Make sure we send the entire packet buffer before bumping the packet
counter, send() does not guarantee that all of the requested data will
be sent at once with STREAM socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case underlying socket reported error while waiting for TX, the
errno value was not set accordingly. This commit fixes this.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Otherwise, if the application was for example blocked on poll() pending
POLLOUT, it won't be notified.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rework how data is queued for the TCP connections:
* net_context no longer allocates net_pkt for TCP connections. This
was not only inefficient (net_context has no knowledge of the TX
window size), but also error-prone in certain configuration (for
example when IP fragmentation was enabled, net_context may attempt
to allocate enormous packet, instead of let the data be fragmented
for the TCP stream.
* Instead, implement already defined `net_tcp_queue()` API, which
takes raw buffer and length. This allows to take TX window into
account and also better manage the allocated net_buf's (like for
example avoid allocation if there's still room in the buffer). In
result, the TCP stack will not only no longer exceed the TX window,
but also prevent empty gaps in allocated net_buf's, which should
lead to less out-of-mem issues with the stack.
* As net_pkt-based `net_tcp_queue_data()` is no longer in use, it was
removed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add new function to allocate additional buffers for net_pkt, w/o any
additional preconditions/checks. Just allocate what was requested.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add soc power management for the STM32F4x chips.
One low power state is added supported by all chips from the family -
the Stop mode with voltage regulator in low-power mode.
The Stop mode for STM32F chips has to work with the IDLE timer -
CORTEX_M_SYSTICK_IDLE_TIMER, because PLL and HSI are disabled in the
Stop mode (Systick is not clocked). The only possible wakeup source is
RTC, which works as a IDLE timer for the Systick.
The exit latency may need to be adjusted per system, depending on the
system tick frequency and other variables.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
() Put the memory bank APIs under the memory management group.
() Document the struct sys_mm_drv_bank.
() Put proper in,out for function parameters.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The macro SRAM_BANK_PAGE_NUM is specfic to the mtl_tlb
driver and is not universal. So move that from public
header into the driver.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
On STM32WL, the backup memory is defined as part of the TAMP peripheral.
This seems to be a deviation from the stm32 family where this memory is
defined as part of the RTC.
The STM32WL reference manual shows that tamp_pclk is connected to
rtc_pclk. This means that the clock required to run the TAMP peripheral
is the same as the RTC's. A quick port of BBRAM on STM32WL is achieved
by instanciating the bbram device as a child of the RTC and by modifying
the address offset to the first backup register from the rtc base
address.
Signed-off-by: Adrien Bruant <adrien.bruant@aalberts-hfc.com>
When enabling async RX the first time after boot, there is an
additional byte received with the first RX_DATA_RDY event,
which seems to be caused by the RX data not being flushed before
enabling the UART RX DMA.
Adding a request to flush the RX data register before enabling
the RX DMA, solves the issue.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Rework Kconfig to improve handling of multiple UART instances by
using Kconfig template file.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit adds missing pinctrl configuration for USARTs in
efm32gg_slwstk6121a, efm32gg_stk3701a and efr32_radio boards
and enables PINCTRL for efr32_radio_brd4180a
and efr32_radio_brd4187c boards.
Signed-off-by: Franciszek Pindel <fpindel@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
The UART backend test suite performs 9 iterations of:
1. Open UART backend pipe
2. Transmit 8192 bytes of pseudo random data
3. Receive and validate bytes
4. close UART backend pipe
The test is run on real hardware, with the TX/RX pins
connected to each other to provide loopback functionality.
The test suite has been run on a STM32 and an nRF5340 board.
The test suite tests both the UART interrupt driven and
async APIs.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The UART flush is not relevant for the async UART implementation.
UART drivers should handle this internally.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Use single ring buffer and protect it with a spinlock as it is
shared between backend and UART thread (ISR). This is simpler
than the double ring buffer setup.
The receive idle timeout has also been made configurable
instead of being a hardcoded value.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The current implementation only waits for the RX disabled event
to determine if the UART is closed. It should wait for all RX
buffers to be released, and the TX to be done as well.
We now also call uart_tx_abort() when closing the pipe.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This commit moves configuration of hfxo from headers defined on board level
to device trees of SoCs.
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
RSRQ is the ratio between send and received signal strength and usually
understood/expected to be represented as a ratio in dB and as such always
has a negative range. So to allow RSRQ to be represented correctly the
resource must allow negative values, but currently it's limited to unsigned
8bit integers.
Signed-off-by: Henning Fleddermann <henning.fleddermann@grandcentrix.net>
When linking with the 0.16.3 SDK version of picolibc, using long long
cbprintf support pulls in the full floating point printf which is much
larger than the integer-only version. This ends up overflowing the memory
region available for it. Increase the size of that by bumping the start of
the fake region by 8kB.
Signed-off-by: Keith Packard <keithp@keithp.com>
In minimal mode, format modifiers are not supported, leading to a lack
of width and precision support.
long long values are presented correctly in either long long or floating
mode.
Signed-off-by: Keith Packard <keithp@keithp.com>
Picolibc's 'minimal' printf mode reduces functionality and size even more
than the 'integer' mode. Use this where memory is at a premium and where
the application knows that it does not require exact printf semantics.
1.8.5 adds two more printf variants, 'long long' and 'minimal'. The 'long
long' variant is the same as the 'integer' variant but with long long
support enabled. The 'minimal' variant reduces functionality and size even
more than the 'integer' mode. Applications can use this where memory is at
a premium and where the application does not require exact printf
semantics.
With these two added variants, the SDK has enough options so that all of
the cbprintf modes can be supported with the pre-compiled bits:
1. CBPRINTF_NANO - picolibc's 'minimal' variant
2. CBPRINTF_REDUCED_INTEGRAL - picolibc's 'integer' variant
3. CBPRINTF_FULL_INTEGRAL - picolibc's 'long long' variant
4. CBPRINTF_FB_SUPPORT - picolibc's 'double' variant
This patch makes the cbprintf Kconfig values drive the default picolibc
variant, disables picolibc variants not capable of supporting the required
cbprintf level, but allows applications to select more functionality in
picolibc than cbprintf requires.
Note that this depends on the SDK including picolibc 1.8.5. Without that,
selecting the 'minimal' or 'long long' variant in Zephyr will end up with
the default variant from picolibc, which is the full version with floating
point support. When using the module things will work as specified.
Signed-off-by: Keith Packard <keithp@keithp.com>
This option in picolibc switches the assert macro between a chatty version
and one which provides no information at all. This latter mode avoids
placing the associated strings in memory.
The Zephyr option is PICOLIBC_ASSERT_VERBOSE and it is disable by default.
Signed-off-by: Keith Packard <keithp@keithp.com>
Picolibc version 1.8.5 offers additional memory savings and new long-long
and minimal printf variants which can be selected from either the SDK or
module version of the library.
This needed a patch to the Zephyr cmake support bits to enable one of the
new picolibc 1.8.5 features.
Signed-off-by: Keith Packard <keithp@keithp.com>
CBPRINTF_FULL_INTEGRAL doesn't happen to explicitly conflict with
CBPRINTF_NANO, but when CBPRINTF_NANO is enabled, there's no long long I/O
support provided.
Allow picolibc long-long I/O support to also be elided when CBPRINTF_NANO
is enabled to save similar amounts of space.
Signed-off-by: Keith Packard <keithp@keithp.com>
For all remaining samples which now set their integration platform
as native_posix(_64) switch them to native_sim(_64)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable the remaining samples which run now in native_posix also
in native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>