This board is a relatively inexpensive development kit for USB-PD
controllers, using an UPD301C controller.
This Zephyr config includes support for:
* UART (present on he debug header of the board), tested with the
hello_world sample application;
* the one standalone LED (CAP_MIS), tested with the blinky sample
application;
* the rotary encoder (PDO_SEL), via ADC, tested with the adc sample
application;
* the current sense amplifier (I_SENSE), currently untested;
* the SPI bus, connected internally in the UPD301C to the UPD350;
* the I2C bus, exposed on the debug header, currently untested.
Note that the drivers.uart.async_api.rtt has to be disabled, as it is
for other m0 boards with no dma or it fails to build.
Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
This has failed in repeated CI runs. Filed an issue
for having it checked. Excluding it until it's
fixed.
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Enable CANFD for rt11xx by including nxp,flexcan-fd
compatibility for all CANFD capable CAN with associated
properties.
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Adds support for the NXP VMU RT1170 board. This Vehicle
Management Unit based on the i.MX RT1176 brings a fantastic
combination of sensors and IO all on one board for development
of various systems. It is also the featured board for
CogniPilot's Cerebri - VMU autopilot software based on Zephyr.
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Moved alloca.h trick further down the file to workaround Doxygen
getting confused with #ifdef/#ifndef.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Data structures in Modules > Utilities > Data Structures were missing
some documentation.
Also properly hid the structures' internals (note that for some of the
files touched by this commit, some internals were already de-facto
hidden by Doxygen as they begin with an _ character).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Move brief and description under group instead of file so that they show
up nicely in the documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a brief subsection about how to build a Zephyr application without
flashing it.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Add a new parameter to `ExternalZephyrProject_Add()`, which determines
whether a given sysbuild image should only be built and not considered
for flashing and debugging. By adding the following arguments:
BUILD_ONLY TRUE
the image will be marked as build-only and excluded from `domains.yaml`.
For cases where this setting should be controlled by users or individual
samples, Kconfig can be used:
ExternalZephyrProject_Add(
APPLICATION foo
SOURCE_DIR /path/to/foo
BUILD_ONLY ${CONFIG_FOO_IS_BUILD_ONLY}
)
This would be particularly fitting for "general-purpose" images, defined
in-tree or via Zephyr modules (whose inclusion in the multi-image build
should also be Kconfigurable).
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit introduces Kconfig symbols for enabling logging
for each nrfx drivers in Zephyr.
Example Usage:
To enable logging for the NRFX ADC driver, add the following
line to the project's configuration file (prj.conf):
CONFIG_NRFX_ADC_LOG=y
The purpose of this change is to enable selective logging
in Zephyr for specific nrfx drivers.
Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
A Kconfig symbol mapping is necessary to enable logging for specific
nrfx drivers in Zephyr, allowing the association of these symbols with
their corresponding nrfx-specific symbols.
Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
The BRD4187C uses the on-chip DC-DC converter to power the RF radio and
power amplifier supplies (RFVDD and PAVDD).
Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
The BRD4187C has a 39 MHz high frequency crystal oscillator and
runs at a 78 MHz operating frequency.
Fix the CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC setting, so it reflects
the actual SYSCLK frequency.
Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
Added several header tags on Application Development.
Edited header hierarchy under Create Application.
Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
In case native interface is used with NET_OFFLOAD enabled, the
net_if_is_ip_offloaded() could lead to a crash, if called on unbound
net_context (i.e. with no iface assigned to net_context yet).
As since commit 40d2240226 the net_context
allocated on offloaded interface is always assigned with the iface
pointer during its creation, it can be safely assumed that in case of
NULL pointer is provided we deal with a native interface. Therefore
instead of asserting on the iface pointer, indicate that the interface
is native when NULL pointer is provided.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add GPIO_SD_B1_05 to "Connections and I/Os". The signal is reserved for
the QSPI interface for the integrated flash.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
sensor_value_from_double was used, but sensor_value_from_float
should be used as the parameter is a float
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
As the cadence uart, has no off-the-shelve microprocessor out there.
Add a build only test case for the cadence uart using the qemu cortex
m3 as the board.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
When compiling the cadence uart, a warning is generated for the
zephyr/zephyr.h include. Fix it to be zephyr/kernel.h.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
dev_id is used as a pointer at the end of the call chain, so passing it
as an int makes no sense and can cause crashes if the pointer and int
types have different sizes. For example, if we have 64-bit pointers on
a board, the higher part of dev_id will be removed due to an type cast.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
The docstring for uart_cmsdk_apb_irq_rx_ready says "@return 1 if an
interrupt is ready, 0 otherwise" but the function actually returns 2 on
success. This commit fixes this to conform with serial driver API.
Signed-off-by: Jason Mitchell <jmitchell@radicalsemiconductor.com>
Add support for apollo4p_evb to the counter alarm sample.
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
This commit instantiates the counter peripheral.
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Add test suite for the DT fixed-partitions API. It is verified on two
kinds of MTD nodes, one of which is meant to represent external memory.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
List `DT_MEM_FROM_FIXED_PARTITION()` and `DT_FIXED_PARTITION_ADDR()` as
the newly added macros.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This convenience API returns the absolute address of a fixed partition,
i.e., relative offset + base address. It's distinct from `DT_REG_ADDR()`
and `FIXED_PARTITION_OFFSET()`, both of which return just the offset.
The base address is taken from the parent memory node as given by the
newly added `DT_MEM_FROM_FIXED_PARTITION()`. This is expected to ensure
that the returned address is directly addressable by the CPU. This is
also meant to prevent `DT_FIXED_PARTITION_ADDR()` from working with
external memory partitions.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This is a new fixed-partitions API, which serves as a companion to the
existing `DT_MTD_FROM_FIXED_PARTITION()`. In the following example:
flash-controller@0 {
compatible = "flash-controller";
flash@1000000 {
compatible = "soc-nv-flash";
partitions {
compatible = "fixed-partitions";
partition@3a000 {};
};
};
};
`DT_MTD_FROM_FIXED_PARTITION()` would let us map `partition@3a000` to
`flash-controller@0`. Now, the new `DT_MEM_FROM_FIXED_PARTITION()` can
let us retrieve the memory node (`flash@1000000`) as well, in a manner
consistent with the existing API.
Caution: if a fixed partition is not said to belong to a memory node,
like in this alternative example:
flash@0 {
compatible = "spi-nor";
partitions {
compatible = "fixed-partitions";
partition@0 {};
};
};
then `DT_MEM_FROM_FIXED_PARTITION()` will map `partition@0` to an
invalid node identifier. This partition belongs to `flash@0`, which
could be an MTD on a SPI bus.
For consistency, the existing `DT_MTD_FROM_FIXED_PARTITION()` is now re-
expressed in terms of the new `DT_MEM_FROM_FIXED_PARTITION()`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Add a new option to `board_check_revision` that can make specifying a
board revision optional. This makes it easier to work with boards that
can come in a base variant with extensions. For example Fanstel BLE
modules that come with/without power amplifiers.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Removed single offset alignment check mechanism and replaced it with
offset alignment check for each iteration
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
This tiny patch makes two improvements:
1. Preserve boolean (=n) assignments from command-line.
This fixes an issue where, if a symbol with `default y` were turned off
via command-line, e.g., `-DCONFIG_BOOT_BANNER=n`, a CMake re-run would
revert that symbol back to its default value.
To avoid this, the assignment should have been preserved in CMake cache
as `CLI_CONFIG_BOOT_BANNER:INTERNAL=n`. However, `kconfig.cmake` clears
unset variables from cache, and (=n) symbols become unset variables, so
an exception had to be made for them.
2. Discard invalid assignments from command-line.
Although `kconfig.cmake` takes care to discard assignments to symbols
which get unset by Kconfig, it wasn't handling the case where Kconfig
would keep the symbol but replace its value, making the CMake-cached
assignment invalid.
For example, this assignment:
west build . -DCONFIG_PRINTK=n
could be invalidated if PRINTK were selected by, e.g., BOOT_BANNER,
producing this warning:
PRINTK (...) was assigned the value 'n' but got the value 'y'. (...)
Still, the old value of (=n) was being cached. One way in which this was
evident was when setting an unrelated symbol in a separate invocation:
west build . -DCONFIG_MAIN_STACK_SIZE=512
the same warning for PRINTK would show up again.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This function has been working fine for parsing Kconfig fragments as
processed by Kconfiglib, but it can be made more robust for parsing
fragments from other sources, including handwritten ones.
Previously, Kconfig fragment lines of the form `# CONFIG_FOO is not set`
were ignored entirely, while lines of the form `CONFIG_FOO=n` would set
the corresponding CMake variable or target property to a literal `n`.
However, Kconfiglib treats both equivalently - as assignments to `n` -
so `import_kconfig()` should too.
Due to the fact that `.config` files output by Kconfiglib always show
disabled options as `# CONFIG_FOO is not set` (which was being ignored),
existing CMake code expects `CONFIG_FOO` to be unset. To avoid breakage,
the variable/property will now be unset explicitly by `import_kconfig()`
when it encounters either representation of `CONFIG_FOO=n`.
Moreover, for bool and tristate symbols, Kconfiglib accepts assignments
like `CONFIG_FOO=yeah`, `CONFIG_FOO=maybe`, or `CONFIG_FOO=nope`, and it
transforms the value of `CONFIG_FOO` into `y`, `m`, or `n` respectively.
This effect is now replicated in CMake.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This makes checksum calculation over Kconfig fragments more consistent,
which prevents writing a new `.config` when nothing really changes.
To explain this, consider the following sequence:
1. west build . -DCONFIG_XXXX=y -DCONFIG_YYYY=y
2. west build . -DCONFIG_YYYY=y
3. west build . -DCONFIG_XXXX=y
At (1), we set new values for XXXX and YYYY, so the `.config` changes.
At (2), we set a value for YYYY, but it's the same value as before, so
the `.config` doesn't get overwritten.
At (3), we set a value for XXXX, but it's the same value as before, so
the `.config` shouldn't get overwritten... but it does. What happened?
The reason is that the generated `extra_kconfig_options.conf` fragment,
which is included in the checksum calculation, was being populated using
two sets of CMake cache variables:
- past assignments, prefixed with `CLI_${KCONFIG_NAMESPACE}_`.
- new assignments, prefixed with just `${KCONFIG_NAMESPACE}_`.
Usually, past assignments would appear before new assignments, because
the default `${KCONFIG_NAMESPACE}` is CONFIG, which goes after CLI in
alphabetical order. As a result, the contents of EXTRA_KCONFIG_OPTIONS
at (1) and (2):
CONFIG_XXXX=y
CONFIG_YYYY=y
were not identical to its contents at (3):
CONFIG_YYYY=y
CONFIG_XXXX=y
resulting in a different checksum.
This is resolved by stripping out the CLI prefix first, then effectively
"mergesorting" the past and new assignments, before starting to populate
EXTRA_KCONFIG_OPTIONS.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The LIS3MDL driver misunderstands the MD[1:0] bits in CTRL_REG3.
Correct this so that all ODR settings are functional.
Currently, single-conversion mode is enabled when fast ODR is set,
resulting in only one measurement being taken before the device
immediately returns to power-down mode. The result is that all fast-ODR
rates (155 and higher) are not usable when assigned to CONFIG_LIS3MDL_ODR.
Continuous mode is the only mode truly supported by this driver and should
always be used.
Signed-off-by: Aedan Cullen <aedan@aedancullen.com>
As per #54658, spi2 is configured to be used on XIAO BLE (Sense) board.
This commit updates its connector devicetree to use this configured spi
peripheral.
Signed-off-by: Xiao Qin <xiaoq@google.com>