Let's always enable the native_posix backend even
if the serial is used.
Both can be used at the same time, and:
a) users expect the logger output in the invoking shell even if they
enable the UART
b) Since printk is routed to the logger twister actually needs it
for tests to pass as for native platforms it looks into the stdout
of the process.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a basic connection test between two devices,
in which the controllers are in separate nrf52_bsim devices
connected over UART to the devices running the host+app.
The controllers are running the HCI UART async sample.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a basic connection test between two devices,
in which the controllers are in separate nrf52_bsim devices
connected over UART to the devices running the host+app.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Reduce a bit the amount of boilerplate by placing common
Kconfig selections in common options.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Provide a good enough UART configuration, but do not
select it as backend by default, let apps do that.
The UART and its driver are very heavy compared to
other backends it may replace, so let's avoid
enabling it by default.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Even if the UART is enabled, let's not use it by default,
in this platform, as this UART is not meant for user
interaction, but to connect other devices
(for ex. BT controller).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Now the HW models include the UART(E) models.
So let's allow selecting it, but let's
not default to it, or enable it by default,
as it is only in very rare cases uses will want it,
and some may already be using the native ptty
instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
* Update the HW models module to
c744f2c762aad79e59bd7e99002f2fcab0a2f288
Including the following:
* docs: UART: several minor fixes
* UART(E): Add peripherals and connect to (D)PPI
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
While waiting for the UART to be ready in ISR
mode, for simulation only, add a tiny delay per
iteration of the busy wait loops to allow
time to pass.
This Z_SPIN_DELAY is an empty macro for any
other target than simulation.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Instead of getting the hardcoded address from the DT structure
use its symbolic name which will be resolved by the nRF HAL
definitions to the same value.
This allows the TIMER peripherals' addresses to be redefined
for the simulated targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The ISR prototype is not matching the
signature for interrupt handlers, which results in
build warnings.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For simulation, we cannot get the UART regiter address
for the pinctrl config structure from DT, as that
cannot match the one allocated at build time.
So let's override it at runtime with the correct address
which is stored in the UART config structure.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Instead of getting the hardcoded address from the DT structure
use its symbolic name which will be resolved by the nRF HAL
definitions to the same value.
This allows the GPIO peripherals' addresses to be redefined
for the simulated targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The ISR prototype used when building without the
interrupt driven UART was not matching the
signature for interrupt handlers, which results in
build warnings.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Interrupt trigger type register each bit indicate the configured interrupt
type. bit value is 0 indicate level trigger interrupt, 1 indicate edge
trigger interrupt.
The level trigger defined to ~BIT(0) equal 0xfffffffe not equal 0.
Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
A Zero Length Packet can be used by higher layer stack to discover when
an endpoint is being processed by the host. An example of this was
introduced as part of 0127d000a2 ("usb: device: cdc_acm: Use ZLP to
detect initial host read") in the CDC ACM class.
Not invoking the callback for ZLPs results in the higher layer stack not
being informed when the packet is consumed. This manifests as a CDC ACM
USB-IP device that cannot transmit to the host while being able to
receive from the host.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
Use the arch-cache functions instead of the sys-cache-functions
in z_arm_init_arch_hw_at_boot to ensure that the caches are
disabled even when CONFIG_CACHE_MANAGEMENT is disabled.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Use sys_cache* functions to enable the caches for stm32f7 and
stm32h7. This ensures that CONFIG_CACHE_MANAGEMENT is
considered correctly.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Use the sys_cache* functions to enable the caches on same70 and
samv71. This will ensure that CONFIG_CACHE_MANAGEMENT is
considered correctly.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Use sys_cache_data_enable instead of arch_dcache_enable to enable
the cache. This will ensure that CONFIG_CACHE_MANAGEMENT
is considered correctly.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Remove the redundant cache config options for kv5x and use
the sys_cache* functions to enable the caches. This will automatically
consider CONFIG_CACHE_MANAGEMENT.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Replace the redundant cache config options for the nxp_imx and
use sys_cache* functions to enable the caches. These will automatically
consider CONFIG_CACHE_MANAGEMENT.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Use sys_cache* for enabling the caches in nxp_s32. This automatically
considers CONFIG_CACHE_MANAGEMENT and will activate the
cases only if this is active.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Some charger devices (such as BQ25710 and ISL9241) issue
notifications to the system via a dedicated line (such as
the PROCHOT signal on x86 platforms) to almost instantly
throttle the system load to prevent a brownout event.
This patch introduces two properties to configure two
distinct input current notification events of different
severity.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Adds support for setting a falling input voltage limit regulated
by an analog loop. Under heavy loads the analog loop will throttle
the charge current to prevent the power source from crashing.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Adds support for setting the target threshold for an input current
limit regulated by an analog loop. The analog loop responds by
throttling the charge current limit as necessary.
These are distinct from comparator based overcurrent protection
thresholds that isolated the charger from the power source when
triggered.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Previously, if an SD I/O operation was attempted while another thread
held the mutex for the SD card, the I/O operation would simply fail. Add
a timeout to k_mutex_lock calls within the SD subsystem, so that
multithreaded access to the SD card instead blocks until the SD card is
available for I/O
Fixes#66211
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Switch to using named IRQs as index-based access makes no guarantees about
devicetree interrupt order.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Switch to using named IRQs as index-based access makes no guarantees about
devicetree interrupt order.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Consistently use "int0" and "int1" as interrupt names for CAN controllers
based on the Bosch M_CAN IP core. This aligns with the upstream Linux
bindings.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit partially reverts a change which was introduced in the
previous commit 5b9a0e5456.
usb_dc_ep_start_read() should also be called on transfer endpoints
like it has been before, otherwise the endpoint will not be armed
after it has been reconfigured.
Signed-off-by: Manuel Aebischer <manuel.aebischer@netmodule.com>
Needed for full functionality of the job server in twister
which only works with kitware supplied ninja version.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add support for J-Link over IP and J-Link remote server.
If the "--dev-id" is a valid ip, the transport over ip is selected.
Otherwise usb is selected.
Signed-off-by: Michael Arnold <marnold@baumer.com>
Added the sl_assert, sl_common, em_core_generic, em_system_generic files
and updated related files in gecko/common and gecko/emlib to include
the mentioned files.
Signed-off-by: Sateesh Kotapati <sateesh.kotapati@silabs.com>
This is a follow-up to commit c7e4d23c5d.
After all calls to `nrfx_dppi_*` and `nrfx_ppi_*` functions were
replaced with corresponding `nrfx_gppi_*` calls, it is no longer
needed to include the `nrfx_dppi.h` and `nrfx_ppi.h` headers.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The sample needs to check in Kconfig whether PPI or DPPI is present
on the target platform in order to enable the proper allocator in nrfx.
It should not use the `HAS_HW_NRF_*` symbols for this as those take
into account also the status of the corresponding DT node, not only
its presence.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This sample makes calls to the nrfx_gpiote driver functions that
require absolute pin numbers, not relative to a given GPIO port,
so instead of getting the numbers with the `DT_GPIO_PIN` macro,
it should use `NRF_DT_GPIOS_TO_PSEL`.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
... so that it is possible to use a GPIO expander pin as the CS line.
Communication with the expander may involve an operation that cannot
be done from the interrupt context (e.g. an I2C transaction).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow-up to commit ea1be7f242.
After the driver performs its initialization, it needs to deactivate
the QSPI peripheral. Otherwise, the peripheral would unnecessarily
consume power until some QSPI operation is performed (and only then
it will get deactivated), what depending on the application may take
a significant amount of time.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
`release` is a mandatory method in the `struct spi_driver_api` API but
is not implemented in the SPI emulator. This can cause a test calling
`spi_release()` to segfault. Add a stub implementation that just returns
zero.
Signed-off-by: Tristan Honscheid <honscheid@google.com>