A number of boards utilize device_get_binding(DT_LABEL(...)) to
get a gpio for some purpose. Switch over to using DEVICE_DT_GET
and device_is_ready() instead. This is part of the ongoing
cleanup towards phasing out usage of the "label" property in DTS.
Signed-off-by: Kumar Gala <galak@kernel.org>
Simple driver that allows one to choose the clock speed of xtensa cores.
It's basically a shim layer on top of SOC level driver.
Also, a really simple test case was added, mainly to ensure things are
build and are sane.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Picolibc has subtly different output from the minimal libc as a result
of different handling for code built without real long long support.
Signed-off-by: Keith Packard <keithp@keithp.com>
When using picolibc, change vprintk to use picolibc's vfprintf instead of
cbvprintf.
Building samples/hello-world for qemu-cortex-m3.
old:
Memory region Used Size Region Size %age Used
FLASH: 9056 B 256 KB 3.45%
SRAM: 3960 B 64 KB 6.04%
IDT_LIST: 0 GB 2 KB 0.00%
new:
Memory region Used Size Region Size %age Used
FLASH: 7900 B 256 KB 3.01%
SRAM: 3960 B 64 KB 6.04%
IDT_LIST: 0 GB 2 KB 0.00%
Signed-off-by: Keith Packard <keithp@keithp.com>
There's no use of the 'count' field of the context, so remove it. Because
that's the only member of struct out_context, remove the whole struct.
Signed-off-by: Keith Packard <keithp@keithp.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Document POSIX wrappers for socket operations, by referencing a
corresponsding `zsock_*` function. The documentation will generate a
link where user can read the actual documentation on the socket
operation.
In order to include the POSIX wrappers in to the documentation however,
it's needed to add CONFIG_NET_SOCKETS_POSIX_NAMES to predefined symbol
list in zephyr.doxyfile.in.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Under no circumstances the generated IRQ vector table can and should
contain NULL values. This is correctly enforced at generation time by
the gen_isr_tables.py script making the existence of the ISR_WRAPPER
define useless.
The enforced behaviour is:
- When the ISR software table exists defaults to _isr_wrapper
- Otherwise defaults to z_irq_spurious
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Extra steps for programming the external memory on nRF5340 DK are
no longer needed. Now west is capable of handling this itself.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When a hex file contains some data that needs to be programmed using
the QSPI peripheral (because it targets the XIP region), nrfjprog
needs to be provided with an option that specifies the QSPI erase
method to be used (otherwise, reprogramming will fail).
This commit adds the "--qspisectorerase" option when needed and it
also fixes the programming routine for nRF53, so that data for the
XIP region is not incorrectly interpreted as intended for the network
core.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Despite the comment it contains, the initialization procedure for
the external memory chip on nRF5340 DK does not enable the High
Performance Mode in the chip, so communication using a frequency
higher than 8 MHz fails and the sample crashes (it works only right
after programming the chip with nrfjprog, which enables the High
Performance Mode, but the chip returns to the Low Power mode after
the board is power-cycled).
This commit fixes the initialization procedure and performs some
additional clean-up.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
pb gatt server starts fast advertising for the first 60 seconds.
After that, server goes into slow mode.
When pb gatt and pb adv work in parallel pd gatt changes fast to
slow modes after the first tx frame in pd adv (about 110ms)
since they both are handled in the same thread.
Actually, pb gatt never worked in fast mode
if pb adv was enabled (in most configuration cases).
Signed-off-by: Aleksandr Khromykh <Aleksandr.Khromykh@nordicsemi.no>
DTS directories can come from multiple places. Some places like a user's
CMakeLists.txt can preserve symbolic links. Others like
`scripts/zephyr_module.py --settings-out` resolve symbolic
links.
list(REMOVE_DUPLICATES ...) does not know anything about directories;
only about strings. To fix it the de-duplication, resolve all symbolic
links in DTS_ROOT first using file(REAL_PATH ...).
Fixes this somewhat confusing error:
```
-- Found BOARD.dts: /home/proj/mymodule/boards/myboard/myboard.dts
devicetree error: both /home/proj/mymodule/dts/bindings/intel,stuff.yaml
and /disk1/home/proj/mymodule/dts/bindings/intel,stuff.yaml
have 'compatible: intel,stuff'
```
Also, print `gen_defines.py` arguments in case of an error so anyone can
see what failed and not just west+CMake experts.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The Nucleo H7A3ZI-Q board has a micro USB connector connected to the USB
OTG HS controller. Enable it and update the documentation.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
On SoCs with two USB controller, Zephyr selects the FS one, and in that
case the ULPI clock needs to be disabled in sleep mode for the
controller to work.
On SoCs with a single USB HS controller, this operation is not needed.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The ULPI clock uses slightly different names on STM32H7X as those
SoC can have more than one USB controller.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
On STM32H7X SoCs, both USB controllers are HS capable, however it is not
possible to connect an ULPI PHY to the USB2 one, which limit it to FS.
Therefore the ULPI clock in sleep mode has to be disabled for USB2 in
all cases. The ULPI clock for USB1 is already disabled when needed in
the usb_dc_stm32_clock_enable() function like for other SoCs.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Do not manually enable the USB clock on STM32H7, as it is already done
in usb_dc_stm32_clock_enable() using the values in the device tree.
This partially fixes the build for STM32H7 devices with a single USB
controller.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The ULPI clock is disabled by default in run mode, there is no need to
disable it again. It is however enabled by default in sleep/low power
mode, so it needs to be disabled.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add IMG_BLOCK_BUF_SZE config into tlsr9518adk80d_defconfig due to
limitations for buffer image writter. The buffer shall be less (multiple
of access alignment) or equal to flash page. tlsr9518adk80d boards use
external P25Q16 IC as flesh memory. Flash page size of the IC is 256
bytes. So that, it is maximum image writer buffer size for such kind of
boards.
Signed-off-by: Alexandr Kolosov <rikorsev@gmail.com>
mcuboot may use a uart as logger. After application boot from mcuboot,
uart remains in some unknown state. It could leads to some unpredictable
uart behaviour. This commit fixes the issue by resetting of uart state
at the beginning of uart init.
Signed-off-by: Alex Kolosov <rikorsev@gmail.com>
- Remove flash_mspi node that contains old one flash partition
- Add new partition in flash node
- Add the partition into choosen
- Add led2, led3 into aliases
Signed-off-by: Alex Kolosov <rikorsev@gmail.com>
In the Zephyr implementation, `sem_timedwait()` uses a
potentially wildly different timebase for comparison via
`k_uptime_get()` (uptime in ms).
The standard specifies `CLOCK_REALTIME`. However, the real-time
clock can be modified to an arbitrary value via clock_settime()
and there is no guarantee that it will always reflect uptime.
This change ensures that `sem_timedwait()` uses a more
consistent timebase for comparison.
Fixes#46807
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Select missing HAS_MCUX_SRC Kconfig symbol for MIMXRT1062,
that allows using NXP i.MX mcux SRC hwinfo driver.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
Some services require the ability to query whether a GPIO pin
is configured as an input, output, both, or neither prior to
performing any operations at the service level. This is done
in order to reduce state tracking within the service.
To that end, this change adds
* `gpio_port_get_direction()`
* `gpio_pin_is_input()`, and
* `gpio_pin_is_output()`
Signed-off-by: Christopher Friedt <cfriedt@fb.com>
The __unused attribute is the preferred way of marking
a variable as unused when assertions are disabled.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>