This label has been removed, since we now convert issues that are just
questions to Discussions.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
if ISR is called for an event on pin X but
another event occurs on pin Y in between the call
to GetStatus() and ClrStatus(), pin Y event wil get
cleared without being processed
Signed-off-by: Maxim Adelman <imax@fb.com>
The driver returns -EIO when a pin to be disconnected was not earlier
configured as input or output, what is not in line with the GPIO API.
This commit changes the driver to return 0 in such case.
Also -EIO is incorrectly returned when an interrupt trigger cannot be
configured in the nrfx_gpiote driver. This commit corrects this value
to -EINVAL.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow-up to commit f301dc2382.
Add missing GPIO_ACTIVE_LOW flag to sw_pwm channel definitions for
nRF51 DK and nRF51 Dongle so that the initial state of their PWM
outputs is properly set up.
Add missing sw_pwm channel definition in the nrf52833dk_nrf52820 target
that was modified in 793362ae5a instead
of in f301dc2382. Add also the pwm-led0
alias for its PWM LED so that it can be used with standard samples.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The gpio_dev field of struct spi_cs_control is deprecated. The
driver was already using SPI_CONFIG_DT_INST, so we should be
using the associated gpio member of spi_cs_control.
Signed-off-by: Kumar Gala <galak@kernel.org>
Replace calls to nrfx_gpiote functions deprecated in nrfx 2.6.0
with recommended equivalents.
On the occasion, switch to using available `nrfx_gppi_*` functions
instead of separate paths for DPPI and PPI channels.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add `status = "okay";` in `arduino_spi` to make sure the node is
enabled (it may not be by default in certain board definitions).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Assign proper pins and add the arduino_spi node label to one SPI node
so that shields that require SPI can be used with the nRF9160 DK.
Due to the limited resources of the nRF9160 SoC, the arduino_spi (spi1)
and arduino_serial (uart1) interfaces cannot be used together on this
board, so remove the default "okay" status from the arduino_serial node
(this status is supposed to be set in a shield overlay that uses this
interface).
The spi1 node was selected as arduino_spi because:
- spi0 could not be used together with uart0 that is used by the Zephyr
console
- spi2 could not be used together with i2c2, which is arduino_i2c and
in newer nRF9160 DK revisions (0.14.0+) also provides communication
with the onboard GPIO expander
- spi3 is used in newer nRF9160 DK revisions for communication with the
onboard flash chip
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Zephyr adds a custom handler that overrides the weak function
sys_arch_reset when TF-M platform partition is enabled.
This takes away the option for the application to override the weak
definition for their platform or use-case.
Add an option that control whether this default reset handling is added
to the build.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The Python python-magic module that we install for compliance checks
requires libmagic to be installed on the system to work. This requires
extra OS packages on Ubuntu and macOS, and an extra wheel on Windows.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update test suite to leverage new ZTEST APIs.
TEST=twister -T tests/drivers/watchdog/wdt_basic_api # Only build
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Include hints shown in the Doxygen documentation need to exclude
'include/' so that we have, e.g. <zephyr/sys/crc.h> and not
<include/zephyr/sys/crc.h>.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
get_version_check will leave the version info unchanged if osKernelGetInfo
fails. This lead to a compiler warning when those results were used.
Initialize the values with data that will cause a failure that should be
easily diagnosed.
Signed-off-by: Keith Packard <keithp@keithp.com>
A full second is too much, and since "Ack local interrupt before
processing IPC" patch, it doesn't seem necessary. This whole second
wait would break tests that log too much content, as the firmware
is already running during the reset - and the host script wouldn't read
the contents, thus some of the logs would be overwritten.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
For now, the logging subsystem is hidden from CDT to prevent freezing of
the IDE.
CLion has the same issue, where the IDE becomes slow with big RAM spikes.
Fortunately, CLion automatically defines a macro __JETBRAINS_IDE__ that we
can use
Signed-off-by: Giuliano Franchetto <giuliano.franchetto@intellinium.com>
Some device clock sources selection helpers were not correctly defined.
With this commit the definitions are updated to match the desciption
in the reference manual RM0453.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
west flash invokes west build and we have no way to tell whether there
was any code change.
Also remove the rename() trick that achieved the same effect in a
a confusing way; just use copy() instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When there is no rimage found in the path, don't invoke west sign with
"-tool-path None". This enhances the error message from the somewhat
cryptic:
ERROR: --tool-path None: not an executable
... to the user friendlier:
FATAL ERROR: rimage not found; either install it or provide --tool-path
Also log the complete west sign command at the "info" level before
running it to show that no signed firmware was found, to show which
rimage is used and in case other rimage problems arise. Invoking an
external command is an important "checkpoint".
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.
Signed-off-by: Keith Packard <keithp@keithp.com>
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.
Signed-off-by: Keith Packard <keithp@keithp.com>
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.
Signed-off-by: Keith Packard <keithp@keithp.com>
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.
Signed-off-by: Keith Packard <keithp@keithp.com>
When running with picolibc, we need more MPU resources for these
tests. Get rid of picolibc malloc arena too.
Signed-off-by: Keith Packard <keithp@keithp.com>
We're not quite sure how much extra stack space picolibc will use, so
give it plenty of space for now.
Signed-off-by: Keith Packard <keithp@keithp.com>
Picolibc inherited its malloc arena configuration from newlib instead of
from minimal libc. This ended up making it a bit too fragile to run the
full set of zephyr tests. In particular:
* Z_MALLOC_PARTITION_EXISTS would get set when not used
* Setting an arena size depended on a bunch of other values, including
whether the system had an MMU or MPU, and whether the MPU required
power-of-two alignment or not.
This patch cleans things up so that there is a single heap size specifier,
PICOLIBC_HEAP_SIZE.
* If PICOLIBC_HEAP_SIZE is positive, this sets the size of the heap. On
MMU systems, picolibc will only use the remaining memory if that's
smaller.
* If PICOLIBC_HEAP_SIZE is zero, then there is no heap available and
malloc will always fail. This also disables Z_MALLOC_PARTITION_EXISTS.
* If PICOLIBC_HEAP_SIZE is negative, then picolibc uses all remaining
memory for the malloc heap.
The defaults are designed to allow tests to work without requiring
additional settings.
* For MMU enabled systems, the default value is 1048576. It would be nice
to have this use 'all available memory', but that's difficult to manage
as the API which returns free memory (k_mem_free_get) doesn't take into
account the amount of free virtual address space.
* For MPU enabled systems which require power-of-two aligned MPU regions,
the default value is 64kB.
* For other systems, the default value is -1, indicating that all
available memory be used for the malloc arena.
Signed-off-by: Keith Packard <keithp@keithp.com>
The malloc partition may actually be empty, if so, don't try to add it to
the domain as that will generate an error.
Signed-off-by: Keith Packard <keithp@keithp.com>