In case the read index points to the end of the packet buffer and thus
wraps around, we must not invalidate the cache, otherwise we draw
outside of the lines and purge data outside of our responsibility.
Signed-off-by: Patrick Wildt <pwildt@google.com>
The ZSR_FLUSH scratch register is only needed if kconfig
CONFIG_KERNEL_COHERENCE is enabled. So update gen_zsr.py
for that.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Print THREADPTR when dumping stack just like other registers.
There is no need to guard that behind CONFIG_USERSPACE.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The description for BT_BAP_SCAN_DELEGATOR_BUF_TIMEOUT is a bit misleading.
Rewriting this to be more accurate
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
spi_transceive returns number of received frames for slave mode.
This information was missing for spi_read type of functions.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The DMA is already enabled for this board, but updating the board doc
page to make that clear, and enabling the DMA loop_transfer test.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
Convert the network log backend to use socket API instead of
net_context API. This allows the backend to be used also
with socket offloading network drivers.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Some of the CSIP tests take a while to run given the number of
devices, and some of them started to fail in CI because of a
timeout, so we increase the EXECUTE_TIMEOUT a bit.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
[Description]
tests: shell: Restart bt will register the same connection callback twice.
Callback next node point to itself, when link established callback function
loop infinitely.
[Fix]
Unregister the previous callback to avoid register repeatedly.
[Test]
After bt init/disable times, create connection successfully.
Signed-off-by: huajiang zheng <huajiang.zheng@nxp.com>
Align the standard action versions with the other workflows, those have
been updated in 0dcb0518be but this file was merged after.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Both advertiser and scanner demonstrate the use of extended advertising
and scanning, and how to gracefully restart the extended advertisements
through the use of recycle() callback. In the sample, the advertiser
initiates a connectable advertisement set, which prompts the scanner to
connect. After the connection is established, the advertiser waits for
5 seconds to disconnect. After the connection is dropped, the advertiser
immediately restarts broadcasting, while the scanner cools-down for
5 seconds to restart its process.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Where extended advertising is restablished through the use of
recycled() callback, registers over bt_conn_cb_register().
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Added on the bt_conn_cb set, used to notify listeners that a previously
allocated connection object has been freed. Used for e.g: restart
extended advertisements.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
- Which allow listeners to attempt to use the freed connection object to
perform actions as e.g: start connectable advertisements.
- Refactored bt_conn_unref() so it does not access conn struct after
decrementing its reference count.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Supurious interrupts can be generated when the SPI device
is disabled. Ignore them within the SPI IRQ handler.
Co-authored-by: Georgij Cernysiov <geo.cgv@gmail.com>
Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
Allow to use H7 SPI FIFO to improve performance.
SPI FIFO usage can be enabled/disabled from devicetree.
Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
Set the transfer size in SPI H7 and check EOT instead of TXC
to be sure the transaction has finished. This is required to
enable the use of the SPI FIFO, as otherwise SPI seems to
operate in "continuous mode", which produces several SCK cycles
after the last frame has been sent/received. More details in the PR.
Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
The sample illustrates how to calculate feedback value based on I2S
sample clock measurement or indirect I2S FRAMESTART and USBD SOF.
The sample is currently only supported on nrf5340dk_nrf5340_cpuapp
target because the feedback measurement uses target specific
peripherals.
While it should be possible to perform feedback value calculation
entirely in software (possibly with some additional filtering due
to software scheduling jitter), the I2S API does not provide necessary
timestamps.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Introduce new USB Audio 2 implementation written from scratch. Main goal
behind new implementation was to perform entity configuration with
devicetree bindings, hiding the descriptor complexity from application.
Initial implementation is working at Full-Speed only. High-Speed support
will come later, but even at Full-Speed only this is viable replacement
for old stack USB Audio 1 class (USB Audio 1 is limited to Full-Speed by
specification, i.e. it is explicitly forbidden for USB Audio 1 device to
work at High-Speed).
Implemented is only absolute minimum set of features required for basic
implicit and explicit feedback samples. Only one sample frequency is
currently supported. Optional interrupt notifications are not supported.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Start of Frame is not relevant for most classes, but it is crucial for
isochronous operation. The most prominent example where SOF is necessary
is USB Audio class.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Extend macros from creating a PM device with an optional argument
which indicate whether type of device is ISR_SAFE or not.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In many cases suspending or resuming of a device is limited to
just a few register writes. Current solution assumes that those
operations may be blocking, asynchronous and take a lot of time.
Due to this assumption runtime PM API cannot be effectively used
from the interrupt context. Zephyr has few driver APIs which
can be used from an interrupt context and now use of runtime PM
is limited in those cases.
Patch introduces a new type of PM device - synchronous PM. If
device is specified as capable of synchronous PM operations then
device runtime getting and putting is executed in the critical
section. In that case, runtime API can be used from an interrupt
context. Additionally, this approach reduces RAM needed for
PM device (104 -> 20 bytes of RAM on ARM Cortex-M).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In the scan delegator when modifying the source we only want to
send a sync request to the upper layers if we are not yet synced,
and not also on a state change
Note that without this change the babblesim test for long writes
will fail
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Scan del bugfix
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Add support for sending long notifications, coming
from a long read, back to the application
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Make sure that buffers are large enough and add
semaphores so that we can do long reads
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Add cleanups to pin presence checks within the mipi_dbi SPI driver.
The cleanups now verify that GPIO and RESET pin devices are ready,
if they are present for the device instance.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Use a delegate for reporting the core clock rate of the fake CAN
driver. This allows overriding the delegate at run-time and inspecting its
call count.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Promote clk_ratio_adj to double for internal calculations related to ratio
to avoid compilation warnings related to implicit conversion from float
to double.
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
GR716A has two SPIMCTRL SPI controllers.
This adds the SPIMCTRL description to the DTS and makes the SPI
option available in the kernel configuration.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This adds support for the GRLIB SPIMCTRL SPI controller used in LEON and
NOEL-V systems. SPIMCTRL can operate in two different modes: In the
default mode it allows memory-mapped read access to the flash data. When
set in the user mode, it can be used to generate SPI bus transactions.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
usbh_req_desc() truncates the descriptor id. This problem is most
visible with string descriptor requests, as only then can wIndex be
greater than 0xFF. In particular, this affects commonly used language
IDs such as English (United States), which is 0x0409.
Signed-off-by: Alexander Kaiser <akaiser@urbansky.com>
Fixes: #68360
This commit introduces <type>_VERSION_TWEAK_STRING which includes
the tweak field in the string, but without the extra version.
This format is used by MCUboot / imgtool, and thus makes it easier to
align code to the format used by MCUboot.
This commit also introduces <type>_VERSION_EXTENDED_STRING which
includes the tweak field in the string in addition to the extra version
field.
The new defines / variables is available in code, CMake, and Kconfig,
and it defined for KERNEL, APP, and custom types, such as MCUBOOT.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The commit export TWEAK version to code through version.h.
This aligns the symbols available in code with those available in
CMake and Kconfig.
The new define is available for both KERNEL, APP, and custom version
types (such as MCUBOOT).
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The normal and posix philosophers samples seemed to have
a number of redundant choices in prj.conf.
Let's reduce to the minimum required for the sample. The
CONFIG_DEBUG_THREAD_INFO option is part of the
documentation, so leave it as-is.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>