Add a property for I2C channel switch selection. This property will
write to the SMBxxCHS register according to the I2C node you selected,
which can make channel swapping.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This patch allow demonstrating fat_fs sample application on
stm32h747i-disco board with SD card.
Build fs_sample using following command
west build -p always -b stm32h747i_disco_m7 \
samples/subsys/fs/fs_sample
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Remove unnecessary newline characters from shell_print, it already adds
them. Align the table pipe characters better in the list of modules.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The memory usage shown in the shell was 0 which is obviously incorrect.
At some point the memory allocation tracking was dropped from llext.c
mistakenly. Add it back.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Reduce the heap and stack sizes needed for the shell loader sample app
so more devices may try it out.
Tried on a mimxrt1010_evk and noted the total ram usage was
approximately 44000 bytes. Prior to this change the mimxrt1010_evk was
unable to run the sample as the bss section overflowed the ram size.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Some platforms already have .bss section zeroed-out externally before the
Zephyr initialization and there is no sence to zero it out the second time
from the SW.
Such boot-time optimization could be critical e.g. for RTL Simulation.
Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
Update the inter-node dependencies documentation to clarify the child
node dependency inheritance recently introduced in 403640b75e.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.
The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.
Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This patch removes the now unused scratch partition and enlarges
the application slots instead.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Added boot state detection, so that the reference count is
set correctly and enable/disable work as expected.
With this fix it is no longer necessary to set
regulator-boot-on when the regulator is enabled in hardware.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
For littleFS, the fstab entries in DTS are ignored currently.
So remove the overlay entries for the same. Also fixed-partitions
can't be used for sdmmc-disk. So remove the same. We just need to
have sdmmc node with zephyr,sdmmc-disk compatible string to have
littleFS working on disk.
build littleFS sample as follows:-
west build -p always -b stm32h747i_disco_m7 \
samples/subsys/fs/littlefs/ -- \
-DOVERLAY_CONFIG=boards/stm32h747i_disco_m7.conf \
-DCONF_FILE=prj_blk.conf
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Care must be taken to avoid any flash access while programming the flash
attached to the FlexSPI either via executing XIP code or reading RO data.
Remove locations where a constant device pointer might be dereferenced
within the mcux_flexspi_nor driver, to help avoid RWW hazards.
Fixes#64702
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Use MDK directly instead of via USBD HAL to not mix direct register
accesses with USBD HAL. In my opinion this change is not really
necessary but reviewers are strict about consistency.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
There is no point in setting the feeder or consumer at runtime. The time
saved due to not checking conditions on each transaction is smaller than
the additional cost of calling function via pointer.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Do not enable nor disable endpoint done interrupts at runtime because it
is not necessary. Simply keep all relevant interrupts enabled when USBD
is active and disable all interrupts when USBD is disabled.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Ensure strict order within interrupt processing to eliminate workaround
in IN transfer acknowledged handler. EPDATASTATUS and DMA done events
are processed in a way that eliminates the possibility for race condions
between interrupt handler and host IN tokens.
Store last started DMA endpoint and use it in common handler for all DMA
finished events. Unify use of ep dma waiting variable because atomics
only make sense if all accesses are through atomic functions - here the
accesses are guarded with critical section.
Do not disable SETUP interrupt when DMA transfers data on endpoint 0 but
simply postpone handling if currently active DMA is on endpoint 0.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
There is no point in calling an empty function on every single DMA
transfer start. While the empty function is just BX LR the fact that is
is called on every DMA transfer makes its impact visible. This change
improves CDC ACM echo throughput by approximately 2%.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Early DMA process handling actually decreases performance in real world
scenarios because real world scenarios tend to be CPU bound. Moreover
the actual optimization is questionable because DMA semaphore can only
be released after the respective endpoint end event is handled. Remove
early DMA processing altogether and only check pending DMA at the end of
interrupt handler.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Rely on semaphore to serialize access to DMA instead of busy looping
after triggering DMA. With this change Ozone Code Profile generated with
J-Trace Pro on nrf52840dk_nrf52840 board running headphones microphone
sample shows following Load changes (trace data was reset once playback
and recording started and percentages were taken when memcpy reached
200 000 Run Count):
* usbd_dmareq_process() from 17.16% to 2.24%
* memcpy() from 9.37% to 8.36%
* nrf_usbd_common_irq_handler() from 8.89% to 10.88%
Mark nrf_usbd_common_stop() as static because the caller must acquire
DMA semaphore before calling this function and the only place where it
is used is already acquiring the semaphore.
Disable EP0 SETUP interrupt when there is active DMA on EP0 to eliminate
the need for aborting DMA on EP0. This code path should not really
happen in real life though because hosts must not issue new SETUP before
a relatively long timeout (at least 50 ms).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Rename local usbd copy from nrfx_usbd to nrf_usbd_common and use it in
both USB stacks. Renaming header to nrf_usbd_common.h allows breaking
changes in exposed interface. Mark all doxygen comments as internal
because local usbd copy should not be treated as public interface
because we are under refactoring process that aims to arrive at native
driver and therefore drop nrf_usbd_common in the future.
Use Zephyr constructs directly instead of nrfx glue macros.
No functional changes.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Copy nrfx_usbd code from zephyrproject-rtos/hal_nordic git revision
d054a315eb888ba70e09e5f6decd4097b0276d1f. This enables us to refactor
the code towards a native driver in a step by step manner where the
smallest changes that bring biggest performance improvements are done
early on.
The code is not a vanilla copy from zephyrproject-rtos/hal_nordic.
The code was reformated with clang-format to match project style.
Manual modifications were done to change comments formatting, place
constant comparisons on the right and add blank lines to pass Zephyr
compliance check.
Relicense to Apache 2.0.
No functional changes.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
One of the ARM architure files, defined since long ago
CONCAT having the exact same purpose as Zephyr's _CONCAT.
Unfortunately this header is included almost always
and the macro defined in all ARM based platforms,
which seems to have lead to many uses of this macro
instead of _CONCAT.
Fix it by using _CONCAT instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This is the first patch with the goal of establishing a common library
for Bluetooth utilities that are commonly used for setup in Bluetooth
Host tests. The ultimate goal is to remove redundant (near) copies of
these utilities and other more ad-hoc solutions.
This patch moves one instance of testlib (from
tests/bsim/bluetooth/host/att/long_read) to
tests/bluetooth/common/testlib and makes it a proper CMake library.
The long_read test is updated to link to the new CMake library.
Further changes and de-duplication will come in later patches.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Added an additional check before failing a BSIM test
on ISO error, so that when we stop the broadcast source
(after the sink have received the expected data), lost data
does not trigger a test failure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This new API returns the version string corresponding to a given
HCI version.
The API can be used by applications to print out human-readable
information about the controller being used.
Adding this API removes possible code duplication.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Adjust the reg of the CS gpios to fix the warning
about the same value used for all existing nodes.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
Fix tcp.c compilation if user unsets
CONFIG_NET_TCP_CONGESTION_AVOIDANCE config option.
Fixes#64824
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the gpio had pull previous enabled, but new config
request wants the pull disabled, the code was failing
to clear the previous pull setting.
Signed-off-by: Mike J. Chen <mjchen@google.com>
The ISR for CQ mode was unconditionally writing into the I2C message
buffer for all transfer types. The correct data was transferred on the
I2C interface, but the clobber caused CONFIG_I2C_LOG_LEVEL_DBG to
display incorrect data for I2C writes.
This change will also help performance of large I2C write transactions.
Signed-off-by: Keith Short <keithshort@google.com>
Fix cmake depreciation warning on pre-defined linker.id
(soc/arm/renesas_ra/ra4m1/linker.ld) used for arduino_uno_r4_minima.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
The enum is mainly to print output of band, so, the default value is 0
which means 2.4GHz, which is not correct when using it to configure like
in connect.
Fix the default value to unknown i.e., no user preference. This way we
can use same enum for both set and get.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
While we will probably want to properly document how to use Powershell
on Windows in the near future, current Getting Started Guide contained a
misleading mention to activating Pythonv venv using Powershell that this
commit removes.
Addresses comments raised in #64682.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>