Make sure smp_transport_clients list is only initialized once and
before any transports will try to register and add entries to this
list.
The smp_init() routine was called after smp_init_uart(), causing
the list to be emptied again after registration of the uart client
transport.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Now that the U5 HAL contains the dedicated LDO status function, use it
instead of reading the register directly.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
New HAL update changed the prototype of the check DMA flag functions.
H7 and U0 use a const parameter for these functions.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This change adds @wearyzen as a collaborator to:
- ARM arch
- ARM Platforms
- West project: mbedtls
- West project: trusted-firmware-m
- West project: tf-m-tests
- West project: trusted-firmware-a
- West project: psa-arch-tests
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
On NXP RT1170 SOC, ADC ETC exists but it can not be enabled because
of dependency on HAS_MCUX_ADC_ETC.
Also, ADC ETC should only work with ADC together, there is no use
case to run it standalone.
Fixes:#81466
Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
Some bluetooth host tests can be run on nrf5340bsim/nrf5340/cpunet.
This commit enables building and running these tests.
Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
Currently different test cases within the same folder are using largely the
same config files with only subtle variations. It is better instead to have
a base config file with general configuration, aided by overlay files for
specific cases.
Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
Bluetooth host bsim tests are compiled with shell scripts, but it is
possible to use twister, which supports compilation (but not running
at the moment). Compiling with twister requires fewer shell scripts,
provides cleaner interface and more flexible configuration.
Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
In the IOMUXC controller, the PDRV field uses 0b0 to set the pin drive
to high, and 0b1 to set the pin to normal drive. Fix the pinctrl_soc.h
definitions for the iMXRT11xx parts to use the correct setting for this
register, based on the documentation for the pin control binding
Note that for PDRV type pins, this commit effectively switches their
drive strength setting.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add tests for the new port / endpoint DT macros
Signed-off-by: Josuah Demangeon <me@josuah.net>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add port and endpoint DT macros to retrieve the node id of the interested
port/endpoint from its id. Also, add helpers to retrieve the peer remote
device node from its local endpoint interface.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Co-developed-by: Josuah Demangeon <me@josuah.net>
If CONFIG_SPI_STATS is enabled, the device state for all SPI controller
drivers must contain the SPI stats. This space is allocated by calling
Z_SPI_INIT_FN as part of the device definition; this is done automatically
when using SPI_DEVICE_DT_DEFINE instead of DEVICE_DT_DEFINE. If space for
statistics is not properly allocated but CONFIG_SPI_STATS is enabled, an
unexpected write to memory outside of the stats region may occur on a SPI
transfer. This commit uses SPI_DEVICE_DT_DEFINE or
SPI_DEVICE_DT_INST_DEFINE for all in-tree SPI controller drivers.
Signed-off-by: Dane Wagner <dane.wagner@gmail.com>
Following the binding rename to "nxp,sysmpu", update the Kconfig
option to align with the binding name and to better reflect the
option's purpose.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Rename "nxp,kinetis-mpu" compatible to "nxp,sysmpu" to remove
the device family from its name.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Rename "nxp,kinetis-dspi" compatible to "nxp,dspi" to remove the
device family from its name.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Replaces code that peeked directly into the thread by instead
calling k_thread_join() to check the state of threads
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The FlexSPI NOR driver should verify all 3 bytes of the JEDEC ID match
the expected value before attempting to use a custom LUT table with a
flash chip. This reduces the odds that an incompatible LUT will be used
with a flash chip, as some flash chips may share the same first byte of
their device ID but not be compatible with the custom LUT table.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
k_fifo_put is a macro that expands the call to net_pkt_ref(pending)
multiple times when CONFIG_TRACING is enabled thus causing extra
reference for the pending packet and a memory leak.
Fix by moving the referencing call to a separate line.
Signed-off-by: Rait Rääk <raitraak@gmail.com>
This option gets the default value "y" whenever HAS_BT_CTLR is enabled, and
since the EFR32 HCI driver now selects HAS_BT_CTLR the right thing happens
either way.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The controller behind the EFR32 driver is a local link layer
implementation, so it makes sense to select HAS_BT_CTLR.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Some of the unittests had an incorrect project name in the
CMakeList.txt file
This is corrected here
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
When not using CONFIG_XIP (CONFIG_XIP=n)
the FLASH_0 mpu region needs to be removed,
otherwise it will have the default base
address = 0, which means that MPU will try
to configure the region with address 0.
We don't want this as in some situations
address 0 can be a restricted memory region
such as ROM code.
Signed-off-by: Alexandru Lastur <alexandru.lastur@nxp.com>
This reverts commit 7c90f1bca1.
Xen initialization maps enlighten page to Zephyr memory and also
initializes Xen event channels. It is used for communication between
Xen domains and based on interrupt connected to domain virtual GIC.
Moving event channel initialization to arch_kernel_init() make it call
irq_enable() when GIC is not initialized. Since GIC is initialized
on PRE_KERNEL_1 stage, this lead to fatal error during boot.
Revert these changes to make xenvm operable again.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
During migration to HWMv2 separate specific defconfig file was removed
for GICv3 version of virtual xenvm boards. It worked fine before
commit 0be0d2175b ("cmake: modules: extensions: Revert using common
board files") significantly changed build behavior, but did not return
previously removed file. This led to build/runtime issues, when some of
the Kconfig options were not selected.
Return GICv3 specific defconfig to board directory to fix configuration
problems.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
The new `host_config_variants` goal is to be able to test specific set
of configurations when building the Host without the need of having a
specific application for it.
The first test check that the Host build correctly with
`CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY` enabled.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The functions `le_sc_oob_config_set`, `generate_dhkey` and
`display_passkey` in `smp.c` were only defined when
`CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY` was not defined. This created
issues at build time.
Remove the guard as the code calling those functions is not guarded
itself.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Fix possible race condition where SMP client might
release the network buffer before system worker queue
has processed it.
In smp_client uses shared resources like worker queue
linked list and network buffers without maintaining any
thread safety.
For unknown reasons, retry timeout handling is pushed
into system worker queue while the actual transmission
is handled from SMP work queue.
Fix the issue by using the same SMP work queue
for both delayable timeout handling as well as
transmission handling.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
In case TLS connect timed out during the handshake, errno was set to
EAGAIN which is unexpected and confusing. Fix this and set the errno
to ETIMEDOUT instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Remove danieldegrasse from NXP maintainers areas.
Substitute myself for the hal_nxp west project area.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add an area specifically for the MCUX shim USB drivers,
as this code is primarily maintained by a subset of the NXP Driver
maintainers. Move MarkWangChinese to this area.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add an area specifically for the NXP WIFI driver code,
since this code is maintained by a different set of people
than the generic NXP Driver maintainers.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Sets CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256 as some log
messages are longer than 128 (default) and may be truncated
with the existing configuration and implementation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>