- Adds boot_request_upgrade() return value check.
- Avoid repeating resets if the upgrade request fails.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The elcdif interrupt is enabled in the write function and disabled in
the IRQ handler for each new frame update. Disabling the interrupt when
no new frame needs to be sent gives the CPU the possibility to enter
low-power mode. However, when the application's frame rate
matches the LCD refresh rate, this adds additional latency.
This commit provides a config to choose between following options:
- Toggle the CUR_FRAME_DONE_IRQ_EN in the write function and in IRQ
handler for each new frame when the power mangement is a concern.
- Activate the CUR_FRAME_DONE_IRQ_EN once at the init function when
low latency is required.
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
To build LLEXT images using the xt-clang toolchain from Cadence
linker flags have to be set similar to other toolchains. Add the
missing cmake files.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The 'tfm' tag was removed from the samples in in
7c80473e0a but it remained in use in other
parts of the project.
This change brings back consistency through out the project.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
- Set MCUBoot "upgrade only" method,
as the program size is 128B (>32B).
- Set slot sizes to the same value,
required by the MCUBoot "upgrade only" method.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The GSM_PPP device driver and its direct dependencies, UART_MUX
and GSM_MUX have been removed. The net/gsm_modem sample has been
removed and the net/cloud/tagoio and net/mgmt/updatehub samples
have been updated to align with this change.
This commit documents all above.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Remove the deprecated uart_mux and gsm_mux modules and all of
their configurations/dependencies across zephyr.
Optimally uart_mux and gsm_mux would be removed in their own
respective PRs, but the two modules are directly coupled, so
to preserve bisectability, they must be removed together.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The new modem_cellular driver had support for the deprecated
generic zephyr,gsm-ppp dts compatible for backwards compatibility.
zephyr,gsm-ppp is being removed, and as such, modem_cellular.c
no longer needs to support it.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The gsm_ppp driver is deprecated, and will be removed, along with
its dependencies UART_MUX and GSM_MUX.
This commit removes the integration with GSM_MUX from ppp.c, making
it solely dependent on the chosen node zephyr,ppp-uart.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
gsm_mux and uart_mux are deprecated and will be removed.
Remove integration with gsm_mux and uart_mux from modem_shell.c
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
gsm_mux and uart_mux are deprecated and will be removed.
Remove integration with gsm_mux and uart_mux from modem_shell.c
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The gsm modem driver is deprecated and will be removed. Remove
the build overlay and dependency on the gsm modem from the
tagoio sample.
The new cellular modem driver and subsystem use the native
networking stack and the pm subsystem, so just like ethernet,
enabling the cellular modem is up to the board configuration.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The gsm modem driver is deprecated and will be removed. Remove
the build overlay and dependency on the gsm modem from the
updatehub sample.
The new cellular modem driver and subsystem use the native
networking stack and the pm subsystem, so just like ethernet,
enabling the cellular modem is up to the board configuration.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The deprecated gsm_ppp modem driver will be removed. Remove
gsm_ppp modem driver from build_all test suite.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The gsm_modem driver is deprecated, and will be removed. Remove
the gsm modem sample which depends on the deprecated driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
a change in the dma driver exposed that the dma_slot was incorrectly
set in the uart driver. this change is needed for async uart on lpc55
to work.
Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
In order to be compatible with Linux AF_PACKET socket calls, the
protocol field needs to be in network byte order.
So for example, if user wants to receive all packets, then the
protocol field needs to be set as "htons(ETH_P_ALL)".
See Linux manual page at
https://www.man7.org/linux/man-pages/man7/packet.7.html
for details.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When running clang-tidy, an 'ineffective bitwise and operation' (type
misc-redundant-expression) was detected on Z_CBPRINTF_IS_PCHAR macro.
As this behavior is expected, we are adding comment to ignore this macro
for the specific misc-redundant-expression check of clang-tidy
Signed-off-by: Nathan Olff <nathan@kickmaker.net>
When running clang-tidy and logging module is used through any of the
LOG_ macro, an issue was raised in Z_CBPRINTF_PACK_ARG2 macro.
A uint32_t variable was copied into a _rws_buffer array with an implicit
cast (error: implicit conversion loses integer precision: 'uint32_t'
(aka 'unsigned int') to 'uint8_t' (aka 'unsigned char')).
Here we are adding an explicit cast to get rid of the implicit
conversion error.
Signed-off-by: Nathan Olff <nathan@kickmaker.net>
This patch removes all uses of the adv auto-resume feature in the
Bluetooth samples. The auto-resume feature is planned for deprecation.
Samples that are not intended to demonstrate a technique to do with
re-connection simply do not restart the advertiser, in interest of
simplicity. The user is expected to reboot the sample when needed.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
When tests control the LwM2M client entirely through
shell, we should be able to set the RD client context
from the application without causing RD client to
start registration.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Behavior of "force"-mode as described in datasheet cannot be achieved if
low-power mode is enabled. After triggering a sampling, the sensor will
not sample again for the period specified in measurement-time.
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
This commit fixes#73337.
Before #72243 Mbed TLS was not using
USE_PSA and all PSA features were not enabled. After #72243
if BUILD_WITH_TFM is set:
- USE_PSA in Mbed TLS is enabled by default and
- all PSA features are enabled.
This commits reverts both changes for net.socket.register.tls
test case.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Cosmetic change to align code style when initializing DSP registers. The
code in intel_is_ace() branch was moved as-is from acetool.py when the
two tools were merged to make reviewing easier. Fix the code style to be
coherent in the merged cavstool.py. No functional change.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use the correct register to read ROM status on intel_adsp_ace20.
Without this this fix, firmware load is successful but
boot takes extra 2 seconds and following warning was emitted:
WARNING:cavs-fw:Load failed? ROM_STATUS = 0x0
The log-only mode (-l) was not working at all and is fixed
by this commit.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The nrfutil runner calls "nrfutil --json device list" which outputs
information about all connected serial ports. The list includes not only
actual boards but also any ttyACM instance. If the ttyACM instance does
not have serial number, then the nrfutil runner will fail on matching
serial number regexp on NoneType.
Fix the issue by limiting nrfutil runner board output to only devices
that have trait jlink set.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add a new driver for the AUXPLL peripheral found in some new Nordic
SoCs, e.g. nRF54H20. AUXPLL is used to clock some peripherals like e.g.
CAN. Note that driver is implemented natively as Nordic HAL lacks
definitions for the AUXPLL IP, this may be changed once these become
available.
Note that usage of nrf_auxpll_config_set generates unnecessary extra
assembly code compared to the proposed API in
https://github.com/zephyrproject-rtos/hal_nordic/pull/185 which
guarantees static initialization and single write access, possible in
the Zephyr context. However, current solution has been enforced until
further discussion on raw access APIs takes place.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Define CANPLL, an AUXPLL IP instance used by the CAN IP. PLL settings
are hardcoded in SoC files, as this PLL should not be configured by the
application. It is meant to always run at 80 MHz.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Define HFXO (High Frequency Crystal Oscillator). This clock is managed
by system controller, from an application point of view it is a fixed
clock.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
For default case it should print the option character provided by user.
Extra shell_help removed as it's being called in the caller function.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Added support to set BSS parameter.
Added support set BSS parameter maximum inactivity time.
Added support set BSS parameter inactivity poll feature.
Added support set BSS parameter maximum number of STA entries.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Support to set BSS parameter "max_num_sta" at compile and run time
Added support to configure `max_num_sta` BSS parameter.
Maximum number of stations allowed in station table. New stations will be
rejected after the station table is full.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Support for configuration of AP parameter "Skip inactivity poll".
Only build time setting is supported.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Support to set BSS parameter at compile and run time.
Added support to configure `max_inactivity` BSS parameter.
Station inactivity timeout is the period for which AP may keep a client
in associated state while there is no traffic from that particular client.
If a non-zero value is set, AP may choose to disassociate the
client after the timeout.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Add UDC driver for IT82xx2 SoC. This commit passes tests with
1. samples/subsys/usb/cdc_acm/
2. samples/subsys/usb/console/
3. The extend endpoint test with CDC ACM tool
4. USB suspend/resume detection
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Refactor CSIP btp commands by removing the 'count' parameter from
set_coordinator_lock and set_coordinator_release functions.
If we want to support lock/release procedure on subset of set members
in the future, 'count' param doesn't indicate a specific set member.
Instead, introduce 'address_count' and 'addr' array params, although their
usage is not yet implemented.
Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
native_sim//64 is one of the allowed platforms
but lacks an overlay which causes the test to fail
to build.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The default has been changed to EC-P256, but there are issues with
this board when TF-M is compiled with MCUBOOT_USE_PSA_CRYPTO (required
by EC-P256) because of its integration in TF-M.
Do not enable PSA crypto on this board for the time being.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
It used to be set as a CMake variable, but TF-M's build system does
not look at such a variable.
Instead, define an additional configuration header file that defines
CRYPTO_ENGINE_BUF_SIZE, and pass it to TF-M's build system.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
With TF-M updated to 2.1.0 it now makes the signature type default
to EC-P256 for the mps2/an521/cpu0/ns board.
So far Zephyr had only supported and assumed that it was RSA-3072.
This brings support for other signature types, and changes the global
default to EC-P256.
The switch from RSA-3072 to EC-P256 reduces the flash usage by ~3.3KB
while having a negligible impact on RAM usage (increase of ~70 bytes)
when compiling the tfm_psa_test sample on mps2/an521/cpu0/ns and
nrf9160dk/nrf9160/ns without explicit optimizations.
The TFM_KEY_FILE_{S,NS} Kconfig options are moved inside an
`if TFM_BL2` as they are only used if MCUboot is included in TF-M.
The TF-M CMake variables MCUBOOT_KEY_{S,NS} are now set so that it's
possible to use signing keys located elsewhere than the default
location.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Restore the check that was introduced in
cd8d4ccad5 and removed in
cac7f4058f, rather than checking only
CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION in the tfm_psa_test sample.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Define and pass down PSA_ARCH_TESTS_PATH only in the sample that
needs it (tfm_psa_test).
Otherwise, it provokes a CMake warning because the variable does not
get used in TF-M.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Remove TF-M version number and explicit mention of the available test
suites; one was missing.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This reverts commit 33786b55ab.
Reverting it because the upstream PR has been abandoned, and
this extra CMake variable is causing the warning
"Manually-specified variables were not used by the project".
As of now the version warning doesn't come up.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Permanently disable the revision checks made in the tf-m-tests
repository that were introduced with TF-M 2.1.0.
They fail because the expected upstream tags are not found in Zephyr's
tf-m-tests.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Display diff of contents for large buffers is not quite helpful and
takes up huge RAM, and if a board has less RAM then this causes the test
module build failures.
So, disable display of diff and just log a failure, small buffer tests
can be used to debug such basic issues and large buffer tests can act as
a smoke test for debugging other issues. This saves about 80K of RAM.
Fixes#72792.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Code adds pm action function that stores SPI configuration
before PD_COM is allowed to be turned off.
PM_DEVICE_RUNTIME scheme is also supported
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Return protocol error if bcdUSB is less than 0x0201. Fix typo in number
of capabilities.
Fixes: b0d7d70834 ("usb: device_next: add initial BOS support")
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It takes 11 CPU ticks to recalculate ctr and cxcprs at the same frequency.
The previously calculated ctr and cxcprs can be stored at the same
frequency without recalculation.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Flushing TxFIFO is racing with actual use of the TxFIFO. The software
controls only one side of the race (flush trigger) while the host
controls the other side. Therefore, locking interrupts before flushing
TxFIFO is not protecting against the race condition.
Disable the endpoint on dequeue to make sure that TxFIFO flushing won't
conflict with host actions (because the endpoint would be forced to NAK
the IN tokens before the TxFIFO is flushed).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Do not set NAK bit again for endpoints that already have NAK bit set.
Do not wait for OUT endpoint 0 disable because it cannot be disabled by
application (DOEPCTL0 EPDis bit is Read-Only).
Disable endpoints before disabling interrupts because it is necessary to
handle RXFLVL interrupt (in Slave mode) for GOUTNAKEFF to become active.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Socket service library uses eventfd, which does not work with
native_posix platform, hence need to exclude it from samples that now
rely on socket services.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Since the display port should be enabled
by default and sleep is bound to the
blanking status, PM constraints should
be acquired at initialization.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Include the device name when printing received CAN frames. This improves
the user experience when working with multiple CAN controllers via the CAN
shell.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When verifying sw_isr_table, take into account custom offset,
like `CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET` in some
RISC-V SoCs.
Relates to #71948 and #73232.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
For SoC with `CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET`,
it should be taken into consideration when disconnecting IRQ.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
Adding a separate overlay for nrf54l15 flpr is required because
running tests on console uart fails.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
This commit should add all the functionality needed for the I2C
driver to work when PM is enabled.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Callbacks were a bit neglected in terms of test coverage, especially
when used in chains. It was clear from the code that chained callbacks
may not actually work, and callback ordering then was hard to verify.
Test callbacks chained to transactions work as expected.
The test iodev had built up some cruft over time and in the process
showed a few bugs once callback chaining was fixed so the test iodev now
better matches typical iodev implementations at this point.
Cancellation testing now includes an added case for cancelling a the
second submission in the chain prior to calling submit noting that no
completions notifications should be given back for those.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This driver is impossible to make time-accurate using single-shot
mode. Time accuracy may be obtained only by using periodic mode, meaning
it is not tickless capable either. Let's simplify the code by only
supporting periodic mode and strip out the TSC stuff. Any hardware with
TSC capability should now use the apic-tsc driver instead.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This adds support for the local APIC in one-shot mode as the timeout
event source for those cases where the CPU supports invariant TSC but
no TSC deadline capability. It is presented as another timer choice.
Existing Kconfig symbols were preserved to minimize board config
disturbance.
This hybrid approach was implemented kind of backward in the apic_timer
driver but it is far cleaner to carry this here.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Let's replicate a common code pattern for this to be abstracted more
easily in the future. In addition to duplicating the correctness fixes
implemented in the ARM and RISC-V drivers, this eliminates a couple large
runtime divisions.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
- `stm32h745i_disco/stm32h745xx/m4` says "#error Flash driver on M4 core
is not supported yet".
- `mpfs_icicle/polarfire/smp` fails in the compilation of the `spi_nor`
flash driver.
- `cyw920829m2evk_02` fails to build because of undeclared
`cyhal_nvm_*()` functions.
As a bonus, group the excluded platforms under the common part to
avoid repeating them.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
CONFIG_POSIX_API depends on !CONFIG_NATIVE_APPLICATION, which is
incompatible with the native_posix platforms.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Remove the `_MAC` part because those Kconfig options enable only hash
algorithms, nothing MAC-related, and the `_ENABLED` part to align the
naming to the Mbed TLS defines (plus we don't need such a part).
As a bonus, enabling SHA-256 does not automatically enable SHA-224
anymore.
See the migration guide entries for more details on the practical
changes.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Change the type of `cpu_id` to `uint8_t` since that is the type
of `arch_curr_cpu()->id`.
Instead of using precompiler switch (`#ifdef CONFIG_SMP`), use
if-else shorthand instead (`IS_ENABLED(CONFIG_SMP)`).
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The commit caches write_block_size and erase_value to stream flash
context, at init, to avoid calling Flash API multiple times
to get these values at various stages of code exectuion,
at run-time.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Driver did not work on ESP32c3, by specifying pin to be output and
input solve the issue. Improve documentation, to highlight that driver
is requiring open-drain support.
Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
The coverage_analysis.py while generating report, duplicates
files and functions of components.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
This test feature is not required and was only used as a dependency in
the usb/console example. It is redundant since the sample already
depends on usb_device.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Rename nxp,kinetis-lptmr compat to nxp,lptmr.
Because of concerns over breaking downstream users,
keep support for the old compatible temporarily and
make it clear it should be changed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove address-of operator ('&') when assigning `gpio_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/gpio`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
When channel range is configured in scan params, get the
channel count from `chan_idx` instead of taking a difference
of start and end of the channel range. The `difference` method
fails in case of 5GHz band since channels may not be consecutive
numbers.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
SD IOCTL handling for DISK_IOCTL_CTRL_SYNC was falling through to the
default return statement, and returning an error when disk sync
succeeded. Fix this issue by properly breaking in IOCTL handler.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Added MAX32690EVKit board
For more information about this board please check
https://www.analog.com/
MAX32690 has two core, Cortex-M4 and Risc-V.
Examples can be build by below command for cortex-m4
west build -b max32690evkit/max32690/m4 samples/hello_world
As a shorthand, the soc may be omitted from the build command and
keeping the corresponding forward slashes:
west build -b max32690evkit//m4 samples/hello_world
Co-authored-by: Jason Murphy <jason.murphy@analog.com>
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Added ADI MAX series soc, first partnumber is MAX32690
The family structure will be
ADI_MAX
MAX32xxx
MAX32655
MAX32655EVKIT
MAX32655FTHR
MAX32666
MAX32666FTHR
MAX32666FTHR2
MAX32690
MAX32690EVKIT
MAX78xxx
MAX78000
MAX78002
...
When MAX32 MCUs goes to sleep mode debugger could not access it
and flashing fails, ARM_ON_ENTER_CPU_IDLE_HOOK prevent
the CPU from actually entering sleep
by skipping the WFE/WFI instruction.
Due to ARM_ON_ENTER_CPU_IDLE_HOOK is not configurable at the user
space, added a config wrapper as MAX32_ON_ENTER_CPU_IDLE_HOOK.
If MAX32_ON_ENTER_CPU_IDLE_HOOK config being defined (default y)
devicei will not goes to sleep mode in idle state.
To disable it add below line in your configuration file
CONFIG_MAX32_ON_ENTER_CPU_IDLE_HOOK=n
MAX32690 has two core Cortex-M4 and Risc-V this commit adds M4 core
support.
Co-authored-by: Jason Murphy <jason.murphy@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.
Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.
Updated the includes path of in-tree sources accordingly.
Most of the changes here are scripted, check the PR for more
info.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Generating separate log entry at INFO level for every single character
dropped is excessive and leads to log flood. Logging dropped character
in no way helps end user and is really a delayed performance killer that
triggers when CDC ACM buffer gets full.
If user does not want to lose outgoing characters then the solution is
to enable hardware flow control which properly blocks in the case the
output buffer is full.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
If the TXABRT bit from ESTAT is ever set (because of a single failed
transmission), the driver will continue showing an error on every
subsequent packet sent, although it is correctly sent:
<err> eth_enc28j60: TX failed!
The enc28j60 datasheet says under
"12.1.3 TRANSMIT ERROR INTERRUPT FLAG (TXERIF)":
"After determining the problem and solution, the
host controller should clear the LATECOL (if set) and
TXABRT bits so that future aborts can be detected
accurately."
Therefore, clear the TXABRT and LATECOL bits in case of transmission error.
Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
cbprintf_package complains about char usage for %p
string argument and suggests void * usage.
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
The ARRAY_FOR_EACH() and ARRAY_FOR_EACH_PTR() macros were not
formatting correctly in vs code (and I would guess other
editors).
Add an entry to .clang-format so that the opening brace is on
the same line as the macro.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
When opaque resources have post-write callback set, but
the write is not a Block-Wise write, there is no block_ctx
and the code causes null pointer dereference when calculating
the offset of the data.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The `z_nrf_grtc_timer_get_ticks()` function converts system ticks
to GRTC ticks. It gets the current system tick to calculate an
absolute GRTC value. The same does the test function to provide
an argument to be converted. If the system tick occurs between those
`sys_clock_tick_get()` calls the `z_nrf_grtc_timer_get_ticks()` will
take into account the newer tick while the test estimate bases on
the old tick value. Due to that the maximum result error is 1 system
tick minus 1 GRTC tick which equals (`CYC_PER_TICK` - 1) for GRTC
ticks.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
This commit aligns the GRTC driver to changes introduced in
hal_nordic. Some of the features regarding GRTC sleep/wakeup
functionality has been modified and moved out to the nrfx
driver's code.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Before this commit, the following bugs were present:
- When `CONFIG_BT_FILTER_ACCEPT_LIST` was set, connection establishment
was cancelled upon RPA timeout. This required the application
to restart the initiator every RPA timeout.
- When `CONFIG_BT_FILTER_ACCEPT_LIST` was not set, the RPA was not updated
while the initiator was running.
This commit unifies the RPA timeout handling for both these cases.
Upon RPA timeout the initiator is cancelled and restarted when
the controller raises the LE Connection Complete event.
The workqueue state is checked when restarting the initiator to prevent
it being restarted when the timeout is hit.
Corresponding test cases have been added to ensure that this
feature works.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Expectation: After calling `bt_disable()` it is possible to
use the Bluetooth APIs as if `bt_enable()` was never called.
This was not the case for `bt_id_create()`, it was not possible
to set the default identity. This prevented an application
developer to restart the stack as a different identity.
Keys also need to be cleared to avoid the following pattern:
1. Pair two devices
2. Central calls `bt_disable()` and `bt_enable()`.
The central will now generate a new identity address.
3. Connect the two devices.
4. Re-establish encryption. Now the central will try to use
the previously used keys. The procedure will fail
because the peripheral does not have any keys associated
with the new central address.
The API documentation is updated accordingly.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add myself to coding guidelines collaborators list
to aid in reviewing PRs and move topics forward
in that area.
Signed-off-by: Simon Hein <Shein@baumer.com>
when GPIO_INT_WAKEUP flag is used in a DT gpios property
the gpio_dt_flags_t var that holds the flags overflows
Hence moving GPIO_INT_WAKEUP flag from bit 28 to bit 6
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Rename write() to telnet_write(), and read() to telnet_read() so
that if we enable CONFIG_POSIX_API, the compiler will not complain
about those two functions as they conflict with POSIX API ones.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The test needs couple of more socket/file descriptors to work because
CONFIG_POSIX_API creates three more file descriptors namely the
stdin, stdout and stderr descriptors.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add checks to make sure that we are not trying to use the socket
service library with eventfd if CONFIG_POSIX_API is not set and if
using native_sim based board. The reason is that we should always
use zephyr libc based eventfd implementation instead of host libc one.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This reverts commit b56297bf16
because it is causing problems when using native_sim and not
having CONFIG_POSIX_API set.
The proper fix is to set CONFIG_POSIX_API when using eventfd
and native_sim so that picolibc is used instead of host libc.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
According to RFC3927 and RFC5227, an ARP probe target HW address should
be set to all-zeroes:
"The 'target hardware address' field is ignored and
SHOULD be set to all zeroes."
Hence, we should allow the ARP probes to have all-zeroes target HW
address as well.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
implement a2dp.c and avdtp.c
add a2dp related Kconfig:
BT_AVDTP_RTP_VERSION, BT_A2DP_SOURCE and BT_A2DP_SINK
a2dp_codec_sbc.c/h are used to provide some APIs to get
A2DP SBC codec information. (like: channel num).
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Introduce `robot` command for running Robot Framework test suites.
Initial implementation consists of one runner dedicated for renode-test,
which is a Renode wrapper for running Robot tests.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Introduce `simulate `command for running samples on a simulator of
choice. Initial implementation consists of one runner, dedicated for
Renode.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Add explicit capabilities to nios2, nsim and openocd runners to prevent
them from having potentially unwanted ones (for example when new
capabilities are added to Zephyr).
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Add capability allowing to suppress the --file parameters that can be
passed to a west command runner.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Initial integration with renode-test was introduced in commit bdf02ff,
which added support for calling the `renode-test` command from both west
and twister.
This commit removes the custom run_renode_test target used for running
Robot tests with the `west build` command and makes twister call
`renode-test` directly instead.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
The notify handle in the BAP broadcast assistant did not handle
conn == NULL properly, and neither did delayed_bap_read_handler.
Add better NULL checks, which also fixes a coverity issue.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a k_busy_wait to the function tx_stream_disable
to be able to complete the drain of the TX queue before disabling.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Correction of the handling of Tx audio samples via DMA
Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add the function ll_func_i2s_dma_busy to be able to check the
transmission of all the DMA TX packet.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
In dma_stm32_reload, the size is the number of bytes and not number
of elements.
Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
In i2s_stm32_isr, remove the errors from SR register
i2s_stm32_configure, enable the rx path for H7 I2S compatible IP
Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add flag STM32_DMA_16BITS as a combination of
STM32_DMA_PERIPH_16BITS and STM32_DMA_MEM_16BITS
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Test on STM32H573i disco board , only the Tx transfer is ok.
Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
This commit should add all the functionality needed for the DMA
driver to work when PM is enabled.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Increasing the adv latency range to the minimum valid
ReceiveDelay value, 10ms. 4ms might be small for some
target systems.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
On SoC like nrf54h20 GPIOTE channels are split between cores. They
are reserved at compile time in devicetree. We need to ensure that
dynamically allocated channels are used only from pool assigned to
the given core. This is done using NRFX_GPIOTE130_CHANNELS_USED mask
which contains data from the device tree.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Update the Quectel LCX6G device driver to use the modem chat
runtime API to modify the dynamic pair chat script.
This change makes the driver safer and more readible by
ensuring safe modification of the members of the modem chat
structures.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add APIs for changing the contents of modem chat matches
safely at runtime.
This allows for reusing a single modem_chat_match at the cost
of placing the match and its buffers in RAM.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add missing configuration files for the nRF5340DK
and missing configuration values for the unicast
samples w.r.t. buffer sizes and encryption.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
These files are created as a result of local babblesim test runs
and can be safely ignored.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
1. Emit stop when not in the correct state and unsupported ibi type.
2. For IBI(MDB), ignore the callback when target not in the
device tree list.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
In release V3.3 new STM32Cube HAL ethernet API was added to STM32 ethernet
driver for STM32F4, STM32F7 and STM32H7 series. At the same time, the
legacy API was deprecated for these series.
I'm now fully removing the legacy API support for these series.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Updated function parameters from `const struct uart_stm32_config *config`
to `USART_TypeDef *usart`. This change reduces the level of pointer
indirection, which minimizes repeated dereferencing and helps reduce
the overall code size.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This change reduces the level of pointer indirection, which minimizes
repeated dereferencing and helps reduce the overall code size.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Change the implementation of net_ipv6_is_addr_mcast_scope() inline
function that let us check if a given IPv6 address has a specified
scope. Previously, it was comparing the whole byte including flags
of a multicast address. It meant, that while checking for a specific
scope a one was also checking the flags. Even in Zephyr's net stack
there are checks for a IPv6 link local scope that are failing for
addresses that are not marked as "well known" (when least significant
bit of the flags is set).
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
https://github.com/zephyrproject-rtos/zephyr/pull/70541 has an
issue where if the screen has been rotated, values calculated if
invert-x or invert-y are set will be overwritten.
This breaks the adafruit_2_8_tft_touch_v2 touchscreen as the
display is rotated by 90 degrees but uses invert-x and invert-y.
This change makes the invert-x and invert-y options independent
of screen rotation.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Introduce a hidden Kconfig option named HAS_WDT_DISABLE_AT_BOOT and
allow users to enable WDT_DISABLE_AT_BOOT only when that hidden option
is selected by a watchdog driver, i.e. disabling at boot is supported.
Select this new hidden option for all existing watchdog drivers that
refer to WDT_DISABLE_AT_BOOT.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In order to prevent index out of bounds access of the sh->ctx->cmd_buff
array when sh->ctx->cmd_buff_pos is 0, it has been added a check for the
value of sh->ctx->cmd_buff_pos.
This ensures that the array will not be accessed beyond its boundaries.
Signed-off-by: Jungo Lin <jungolin.tw@gmail.com>
This commit removes unnecessary initialization of the local variable
where its value is guaranteed to be overwritten by subsequent operations.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Use a code spell-checking tool to scan and correct spelling errors in
the following files:
- clock_stm32_ll_common.c
- clock_stm32_ll_h5.c
- clock_stm32_ll_h7.c
- clock_stm32_ll_u5.c
- clock_stm32_ll_wba.c
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
We're not supposed to rely on symbols provided by these files.
In case it is required stm32 zephyr code base should be updated rather
than relying on legacy definitions.
Additionally:
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/70136
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
The software protocol to write status value of 0x05 (FW_ENTERED)
into memory window 0 at Zephyr boot, is not needed in the ace1.x
boot flow and does not match the semantics host systems are expecting
at this location in the memory window (e.g. write of 0x05 is not
expected).
Make this logic specific to intel_adsp_cavs platforms and move the code
out from common intel_adsp code.
This commit depends on update to cavstool.py to use correct
ROM status register to observe boot state.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Starting with ace1.x, the boot status is no longer reported by
the boot ROM in the SRAM status window as it was done in older
platforms. The current cavstool.py code works on these newer platforms,
as Zephyr soc bootcode writes to same location, but this is not
the recommended boot flow.
Modify boot flow to use a dedicated register to observe boot
state. This change improves usability of cavstool.py on ace1.x
platforms as:
- it is possible to start cavstool.py (e.g. in log-only or shell mode)
while DSP has been already been booted, but is currently in
low-power mode (and SRAM window is not accessible from host)
- more reliable boot and better error reporting as actual ROM
status is observed
Furthermore, this change allows to remove the memory window
writes from Zephyr intel_adsp boot_complete(). This IPC interface
is application and IPC revision specific and the write should not
be done in generic Zephyr SoC code. However, to keep cavstool.py
working, the tool has to be updated first.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
net_pkt_alloc_buffer() deducts the free space from the requested number
of bytes.
As ppp_save_byte() calls net_pkt_alloc_buffer() when the packet has one
byte available still, this causes all but the first net_buf in the
packet to be of size CONFIG_NET_BUF_DATA_SIZE - 1.
Consequences:
- With CONFIG_NET_BUF_FIXED_DATA_SIZE enabled, one byte per net_buf
gets wasted.
- CONFIG_NET_BUF_DATA_SIZE has typically an even, likely even a power
of two value. Using exactly one byte less per buffer causes
operations that require aligned memory (e.g. DMA) to become
inefficient or to not work at all.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
The condition was the inverse of what it should have been, leading to an
inevitable NULL pointer dereference later.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
APPLICATION_CONFIG_DIR is supported in Zephyr and allows to adjust the
location from which prj.conf and friends are picked up.
This also works for images when using sysbuild, however sysbuild itself
ignores the value of APPLICATION_CONFIG_DIR, meaning that sysbuild only
accepts sysbuild.conf located directly in the sample folder.
Extend sysbuild to support APPLICATION_CONFIG_DIR so sysbuild follows
regular Zephyr CMake behavior.
Introduce SB_APPLICATION_CONFIG_DIR to allow changing the location
for sysbuild only, without propagating the value to images.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit refactors sysbuild entry code by creating a CMake sysbuild
module for image processing and place sysbuild entry code in a
<app>/sysbuild/CMakeLists.txt file.
A template/CMakeLists.txt file will be use as template for applications
which doesn't provide their own entry file.
An application may create a sysbuild/CMakeLists.txt file.
The sysbuild/CMakeLists.txt file is similar in nature to the
toplevel CMakeLists.txt file but intended to used by sysbuild.
This allows application developers to adjust how an application is
built with sysbuild.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Use of ARGV1 is undefined when number of arguments to function is less
than 2. Therefore switch to ARGN which holds arguments beyond required
arguments.
If there are no optional arguments, then ARGN is just an empty list,
thus making it safe to use.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
If CDC ACM uart side has TX enabled when the configuration gets enabled,
depending on fifo state following has to happen:
* if the fifo is empty - trigger TX ready interrupt
* if the fifo is not empty - queue TX data on IN endpoint
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Commit 2f31ee63b5 ("usb: device_next: convert ASCII7 strings to
UTF16LE on the fly") made string descriptors respond with twice as much
of the actual string data.
Fix the issue by taking into account that USB string descriptor length
is already multiplied by two. Additionally, make it possible to return
odd number of bytes if host requested so.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Fix timing in SPI bitbang driver.
The issue occurs with CPHA=1 when the input data is changed immediately
after the clock shift on the last bit of the read.
Because we read the input bit after changing the clock, this bit
becomes invalid.
Instead of doing wait, clock-change, read. Do wait, read, clock-change.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
The socket allocation count was incorrectly calculated as
we have only one socket per listened port.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The socket allocation count was incorrectly calculated as
we have only one socket per DNS server.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This fix avoids this warning:
WARNING:root:Unused expression: \
.*Duplicate C declaration.*\n.*'\.\. c:.*:: zsock_fd_set'.*
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add information about DNS resolver and mDNS/LLMNR responders
which are converted to use the socket services API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The compilation was failing if IPv4 was disabled.
Also fix the IPv6 test so that they pass properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If DNS_EAI_ALLDONE is returned, it indicates that the request
was done and should not be considered an error.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This was the source of assert failures.
If only they were enabled in the first place...
The issue is that in order to save on build time, these two tests build
only one image, from which two devices are
instantiated (`gatt_client_test.c` and `gatt_server_test.c`).
The double-registration happens as `BT_CONN_CB_DEFINE()` is build-time, and
is included in two files of the same image. Then _both_ images will end up
with both `connected()` `disconnected()` etc callbacks, which have logic
specific to their respective images/devices.
The patch uses runtime registration instead so each device only ever
registers its own callbacks and not the other device's too.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit defines the bt-hci subnode under the bleif node on
Ambiq Apollo3 Blue and Apollo3 Blue Plus SOC.
Also add the default configurations for Bluetooth feature on Ambiq
apollo3_evb and apollo3p_evb.
Signed-off-by: Aaron Ye <aye@ambiq.com>
The controller may be unavailable to receive packets because it is busy
on processing something or have packets to send to host. Need to free the
SPI bus and wait some moment to try again.
Signed-off-by: Aaron Ye <aye@ambiq.com>
The BLE controller of some Ambiq Apollox Blue SOC may have issue to
report the expected supported features bitmask successfully, thought the
features are actually supportive. Need to correct them before going to
the host stack.
Signed-off-by: Aaron Ye <aye@ambiq.com>
This commit add the SPI-based HCI support for the Ambiq Apollo3 Blue
SOC (e.g. Apollo3 Blue Plus, Apollo3 Blue) support.
Also correct the dependency of necessary peripheral.
Signed-off-by: Aaron Ye <aye@ambiq.com>
This commits add the BLEIF instance which is compatible with
"ambiq,spi-bleif" on Ambiq apollo3p_evb and apollo3_evb.
Also creates the default pinctrl for the defined instance.
Signed-off-by: Aaron Ye <aye@ambiq.com>
Some Ambiq Apollox Blue SOC (e.g. Apollo3 Blue) uses internal designed
BLEIF module which is different from the general IOM module for SPI
transceiver. The called HAL API will also be independent. This driver is
implemented for the BLEIF module usage scenarios.
Signed-off-by: Aaron Ye <aye@ambiq.com>
This sample uses the FXOS8700 compatible accelerometer to emulate
relative mouse movement. While this is an interesting example, it does
not provide anything unique in terms of sensor drivers or USB device
support. The example has no documentation and unsafe report buffer
handling. The example would need to be completely rewritten to make it
generic and use any accelerometer, e.g. with an accel0 alias. From a USB
perspective, there is no interest in maintaining this sample or porting
it to the new device support and new HID device API.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Make sure that esf is not NULL before calling
z_riscv_unwind_stack to prevent NULL pointer dereferencing.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Clock must be restored as soon as the SoC leaves standby.
Keep the logic inside the SoC instead of delegate it to the pm
subsystem.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
pm_system_resume() can be called directly from ISR and because of this
devices should be resumed before calling pm_state_exit_post_ops().
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There is no need to this function be defined inside the kernel since
all places using it are protecting the call under ifdef PM guards.
This way we can also remove the ifdef condition inside the implementation.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixing a bug where wrong instance was enabled when SPIS137 was supposed
to be used.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Changes for making the clock control api tests generic for
any board.
All the device subsys definitions were moved to its own folder
according to the clock compatible.
Also if the clock's async feature is not supported by the target,
the test is skipped instead of failed.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
The RTC subsystem in espressif's SOCs, among other tasks
is responsible for clock selection for CPU and for low
power domain clocks such as RTC_SLOW and RTC_FAST.
This commit allows for proper clock source and rate
selection for CPU, using the espressif,riscv and
espressif,xtensa-lx6/7 bindings.
It also enables clock selection for RTC_FAST and RTC_SLOW,
that impacts some peripherals, such as rtc_timer.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Add the option to support an external loader for flashing
hex file to internal and external NOR flash using
the STM32CubProgrammer CLI with a board_runner_args
"--extload=MX25LM51245G_STM32U585I-IOT02A.stldr"
The absolute path of the stldr file is added to the
stm32CubeProgrammer command.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Print the raw DLC when enqueuing a CAN frame for sending, not the
corresponding number of bytes.
Fixes: #73309
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Zerorise the CAN frame before filling in data to ensure all data bytes are
initialized.
Fixes: #73309
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Regarding recent changes in general MPU configuration
(https://github.com/zephyrproject-rtos/zephyr/pull/71969), add
appropriate configs for isolating thread stacks into ARC MPU.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
PR #72592 made pylint to use json2 output format. However, this
format is introduced in pylint v3. This commit adds an appropriate
setting in the requirements file.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This allows a customized coredump_backend_other API to re-use the
COREDUMP_*_STR without re-defining the same strings.
Signed-off-by: Younghyun Park <younghyunpark@google.com>
The BR Keys cannot be scanned by function
bt_foreach_bond.
Add function bt_foreach_bond_br for br.
The function bt_foreach_bond_br will be
called by bt_foreach_bond if the BR is
enabled.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
When compiling with CONFIG_DEBUG_COREDUMP=n and including
<zephyr/debug/coredump.h> from any file, linking fails with a multiple
definitions error. Define the functions in the header file as static
inline.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Build the vendor specific sample hci_vs_scan_req for
BT_LL_SW_SPLIT variant of the Controller only.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Test the registration of interrupt controller with the
intc_table and verify that thru the sw_isr_table APIs.
Verified registration with all 3 interrupt levels.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Use the multi-level interrupt APIs that accepts `level` as an
argument for the code where the level of the interrupt is not
known at build time.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add APIs that accept an additional `level` argument, and use
that to call the respective functions. In some cases this can
reduce code complexity, especially when the level isn't known
at build time.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Save the reference of the start index of the `_sw_isr_table`
to the config struct, so that the `local_irq` can be used as
offset directly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add a note on the revamp of the multilevel interrupt
architecture, the changes to be made, and new macros to help
with the update.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Previously the multi-level irq lookup table is generated by
looping through the devicetree nodes using macros & Kconfig,
which is hard to read and flimsy.
This PR shifts the heavy lifting to devicetree & DT macros such
that an interrupt controller driver, which has its info in the
devicetree, can register itself directly with the multi-level
interrupt architecture, which is more straightforward.
The previous auto-generated look up table with macros is now
moved in a file of its own. A new compatibility Kconfig:
`CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION` is added and
enabled by default to compile the legacy look up table for
interrupt controller drivers that aren't updated to support the
new architecture yet.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
VPR cores CLIC supports vectored mode only and can't be
disabled. Filter out `CONFIG_NRFX_CLIC` to prevent build
error.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
VPR cores CLIC supports vectored mode only. Select
`GEN_IRQ_VECTOR_TABLE` such that it can't be disabled.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Adding bt_tester support.
Adding bt_tester app build
with Twister for rd_rw612_bga board
Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.
Disable twister build on samples that are not meant to
be supported on this board, so exclude it from the test cases.
Update peripheral/central ht sample.yaml files
to test build for rd_rw612_bga.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
- Add pinctrl for flexcomm0 in usart mode
needed for BLE tester application
- Reserve the firmware storage partition
- Mark HCI as a wakeup source
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Added NXP_FW_LOADER for NXP platforms.
Added NXP_RF_IMU for NXP platforms.
Added MONOLITHIC Flags for NXP platforms.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Add HCI driver generic to NXP platforms.
Update west.yml to have ble support for rw61x
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
If rx buffer allocation has to be deferred to rx_thread, we need to stop
isr reading from mailbox as otherwise rx_thread won't be able to process
other buffers.
Since CMAC2SYS irq is cleared before data is read from mailbox, in case
rx buffer allocation was deferred we also need to trigger irq manually
to make sure all pending data is processed.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
@template@s will be replaced by empty strings and the comment in generated
files will be broken. Replace them with just simple words.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
- Add initial version of CYW920829M2EVK-02 board
- [drivers: clock_control] Make it possible to set up both iho and imo
clocks instead of just one or the other
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Fixes: #70258
Specify NO_CMAKE_PATH to prevent CMake find_program from having a
preference for searching CMAKE_PREFIX_PATH.
Some tool like NixOS / Nix package manager sets this variable
to point inside the nix store, like this:
CMAKE_PREFIX_PATH=/nix/store/gpvnsgf8zhqjjgk63dd...-python3-3.11.6-env
thus causing `find_program()` to prefer this over the tool in the
default path.
Support Nix environments by specifying NO_CMAKE_PATH and in addition
support `VIRTUAL_ENV` environment setting for search path when set by
the virtual environment.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The CMAC uses lp_clk as a sleep clock so it has to be updated if
frequency of lp_clk has changed. This happens either after XTAL32K
settling or RCX calibration.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Refactor the 54L board file to be able to better support out-of-tree
non-secure boards.
This aligns better with nrf53's DT.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add missing nrf overlays to fix the sample at build time.
Copied from samples/drivers/watchdog/boards.
It is not clear why the build failure was not detected earlier.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Pins P0.06 and P0.07 are shorted on nRF5340 DKs prepared for on-target
tests because that is required for UART tests. That causes background
SPIM transfers in this sample to fail because SPIM is not able to drive
its SCK line configured as P0.06. Rearrange then the pins used in this
sample, so that SCK is not on a pin involved in a GPIO loopback.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Chosing by default in the prj.conf
PICOLIBC ensures we also use an embedded
libC even when built for a native target
and even if we dont set POSIX_API.
This ensures the test will build and pass
properly when built with default configuration
from command line without using the test yaml.
This change does not affect the build result
for other targets as those defaulted already
to PICOLIBC.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Note that the Init of the alarm has no need for BCD2BIN conversion,
the LL_RTC_ALMx_Init will do. Add more log debug
The driver must clear the ALARM enable bit before wrting the alarm
registers.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Set a Calendar using the LL functions LL_RTC_TIME_Init
and LL_RTC_DATE_Init. Add more DBG info
On the stm32F2 serie, check RS Flag after setting calendar registers.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add a timeout to the tests/drivers/rtc_api testcase so twister
can end properly when running with twister.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Implement a function bt_audio_get_chan_count that takes an enum
bt_audio_location and returns the number of channels in that value.
This PR fixes#69617
(https://github.com/zephyrproject-rtos/zephyr/issues/69617)
Signed-off-by: Babak Arisian <bbaa@demant.com>
Align grpcio version with logic2-automation package fixing its fail
on Channel.unary_unary() call with missing _registered_method argument..
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Make it a little bit easier to read using already existent
definitions for the registers used here.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Secondary cores are not allowed to be power gated on
runtime-idle. They have to explicitely set off by host command.
Remove this state from secondary CPUs so power management logic
does not need workarounds to enforce this behavior.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
In twister, applying quarantine is a part of apply_filters() function.
However, this function is not called when --load-test is used.
Therefore, if one wants to use quarantines in combination with
dynamic scope from the test_plan.py script, one has to pass such
info through the script.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This is a follow-up to commit e53e5448ee.
In the above commit, the calls to `wdt_setup()` were modified to use
the `WDT_OPT_PAUSE_HALTED_BY_DBG` option to prevent problems with
flashing of boards after this test was executed on them (the still
active watchdog could interrupt such flashing), but this option
is not essential to the test itself. And if a watchdog driver does not
support pausing when the CPU is halted by a debugger (this is the case
for example for wdt_counter), it is not able to pass the test because
of that option. Add then the possibility to continue the test when
pausing by debugger is not supported.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Two API calls that are supposed to set up the watchdog are not actually
causing the test to fail, only error messages are printed. This patch
adds the proper return statements.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Installation of single toolchain causes problems for customers who
are not familiar with Zephyr infrastructure. This tip is supposed
to help them.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
When disconnect request is successful, the status
was taking as WIFI_REASON_DISCONN_UNSPECIFIED only.
Adding WIFI_REASON_DISCONN_SUCCESS which can be help
to determine status of disconnect request. If this status
is failed then reason can be useful.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Get the preferred QoS settings via bt_bap_ep_get_info()
Therefore no need to use the internal header file to get it.
This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/72359
Signed-off-by: Ping Wang <pinw@demant.com>
When function sys_clock_set_timout() is called with small value
(i.e. 1) calculated time to be programmed to TIMER2 reload
register may be such that is expires before code set's it
up. In that case timer interrupt will be scheduled in far
future.
With this change, code checks after it sets reload value if
requested time already passed and if so TIMER2 interrupt
is marked as pending to avoid races.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
With the addition of the STM32 hardware semaphore MBOX driver, this
sample is now supported by the board.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
With the addition of the STM32 hardware semaphore MBOX driver, ICMsg is
now supported on the stm32h747i_disco board.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
When sending a lot of data, a busy error code returned by the IPC is to
be expected. But if the last attempted send returns busy, this error
code is returned to the calling function, causing an error log message.
Fix this by setting return variable to 0 on this acceptable error.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
The MBOX driver interface expects a device tree property '#mbox-cells'
which is not known by the IPM driver. This causes build problems when
both drivers are given for a single shared DT node.
To fix this problem for this driver specifically, add a dummy
'#mbox-cells' property to the bindings of the STM32 HSEM IPM driver.
This does not affect any other IPM driver, and the STM32 HSEM IPM driver
is still functioning with this dummy property.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
Add a device tree binding for the new driver. Since there already
exists an IPM driver using the unsharable hardware semaphore interrupt,
the new driver is not added to any boards or SOCs per default to avoid
compatibility problems. See #37300 for the IPM driver.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
This driver implements a simple MBOX device which supports a single
instance, two channels (one for each direction), and only signalling
mode with no data transfer. Signalling to another core is achieved by
taking and giving two hardware semaphores, similar to the STM32 HSEM
IPM driver.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
The type of the resource table is known, casting to and from void* only
hides this type which can prevent the compiler from giving helpful
warnings. One warning would have been the accidental use of
"st_resource_table" in a cast, a struct which does not exist.
Use the fw_resource_table type when dealing with resource tables.
Signed-off-by: Andrew Davis <afd@ti.com>
This structure is shared between cores which may have different type
widths. Use fixed width types when defining the structure. We can
also use struct resource_table to help as it is already defined with
fixed width types and removes the need to redefine these elements.
Signed-off-by: Andrew Davis <afd@ti.com>
Check the return values of commands such as spi_nor_cmd_* and
spi_nor_wait_until_ready and ensure they are propagated back to the
caller on error.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Test was not covering nrf54l15 which had Synth source bitfield
renamed. Changing the test to use Kconfig to determine if
Synth is present.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The commit removes unneeded check for enter_4byte_addr_exist in
the function, as the utility function is supposed to set the address
by parsing enter_4byte_addr parameter, while the enter_4byte_addr_exist
used to exist only for DTS entries that directly set enter-4byte-addr
parameters for a flash node.
The change also moves LOG_DBG reporting enter_4byte_addr before
it is processed, to allow logging what actually function will be working
with, before it does so.
The enter_4byte_addr_exist is removed as it is no longer used anywhere.
Setting of data->flag_access_32bit has been moved in the same code block
as call to the spi_nor_cmd_write, as it can be only consequence of
successful call to that function.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Subghzspi instances cannot have any pinctrl configs. This causes a
failure of the power management suspend and resume operations for the
subghzspi instance because no "default" pinctrl is found.
Fix that by skipping the pinctrl parts on subghzspi instances.
At the same time fix a copy and paste in the suspend error message.
Fixes: b567a7db83
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Temporary solution as there is no such harness as remote.
However console regex are not defined yet.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Add a definition of SUIT storage, so there will be a common source of
the SUIT storage location for both SDFW and scripts generating SUIT
storage areas, assigned to local domains.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Add new channel: `SENSOR_CHAN_POS_DXYZ`, so that it is
consistent with other 3-axis channels.
Updated pytest, `sensor_shell` & `fake_sensor` accordingly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Update the pytest script to exercise the entire
`sensor_channel_name` table with `parse_named_int()`.
The `gauge_desired_charging_current` is selected because
it is the last one in the table before `all`, `all` is not
used because `sensor get sensor@0 all` doesn't return anything.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
If `CONFIG_SENSOR_INFO` is enabled, use the `sensor_info`
section to validate that the argument is a sensor before using,
otherwise the shell command will hang the application.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The `SENSOR_CHAN_VSHUNT` was added in #60717 but was never
added to the `sensor_channel_name[SENSOR_CHAN_COMMON_COUNT]`
table. Since the length of `sensor_channel_name` is fixed to
`SENSOR_CHAN_COMMON_COUNT`, this means that the index at
`SENSOR_CHAN_VSHUNT` points to `NULL`. When we use the
`sensor get` command for anything bigger than
`SENSOR_CHAN_VSHUNT`, we will deref that `NULL` pointer
when we do `strcmp` in the for-loop of `parse_named_int`.
Fix this by defining `SENSOR_CHAN_VSHUNT` in the table.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This patch removes all uses of the adv auto-resume feature in the audio
bsim tests, and instead makes all adv starts explicit.
The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This commit should optimize the way the device is allowed
to enter the suspended state. Instead of returning a PM
error code to abort the PM process, the standby power state
is constrained as long as the device is not allowed to enter
suspension. With that approach, acquiring PD_SYS is not needed
when in PM device runtime mode.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should optimize the way the device is allowed
to enter the suspended state. Instead of returning a PM
error code to abort the PM process, the standby power state
is constrained as long as the device is not allowed to enter
suspension. With that approach, acquiring PD_SYS is not needed
when in PM device runtime mode.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should optimize the way the device is allowed
to enter the suspended state. Instead of returning a PM
error code to abort the PM process, the standby power state
is constrained as long as the device is not allowed to enter
suspension. With that approach, acquiring PD_SYS is not needed
when in PM device runtime mode.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
New nRF54H20 SoC series expose more ports, e.g. P9, so reserve more bits
for the Port+Pin field.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
In some relatively rare conditions, the DFU detach/attach happens to
fast, which cause the host to not notice it. It seems to to be the case
for instance on STM32 when no endpoint are being used.
Adding a 1 ms delay (i.e. one SOF period) between the detach and the
attach fixes the issue.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
d599e2b670 removed early return from sys_clock_timeout_handler if
current counter value is less than cc_val. It seems that this return is
needed as after the removal some stress tests which were using system
timers heavily started to hang.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Allocate the GPIOTE channels that the Bluetooth Controller needs to use
with the dedicated function provided by the nrfx_gpiote driver instead
of using hard-coded indexes of these channels, as now, when the driver
supports multiple GPIOTE instances, it would be much more difficult to
properly inform the driver which channels should be reserved.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This definition is no longer supported by the nrfx_gpiote driver (since
nrfx 3.2.0, reserved channels need to be defined per GPIOTE instance),
so remove it to not mislead users.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.
Modified the comment to omit the scannable part
and corrected the connectable part.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.
Modified the comment to omit the scannable part
and corrected the connectable part.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Not necessarily related to the namespacing changes, but just
establishing proper indentation formatting throughout the whole file.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
MCS OTS support doesn't implement OTS checksum and if this is globally
enabled assert is triggered.
[00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0
ASSERTION FAIL [ots_init->cb->obj_cal_checksum]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476
Callback for object calculate checksum is not set
This should be reverted when Zephyr issue #72471 is fixed.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Since 7eaca455fa, pyserial is required for
building docs because `DeviceAdapter` from the `pytest-twister-harness`
plugin, which is imported by autodoc, now depends on it.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
By default PSA crypto library copies all the buffers that are passed
in into the heap before further processing them. This is required
when the PSA crypto library is on the secure side and it accepts
buffers from a non-secure code. However this case in Zephyr
is already handled by TF-M, so when the PSA crypto library is
built (CONFIG_MBEDTLS_PSA_CRYPTO_C) then it will be on the
non-secure side. Therefore this malloc copy is useless and
it consumes heap memory. Setting MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
at Mbed TLS build time helps in removing this mechanism and
it saves heap memory.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This block of code was in the original commit that added
CONFIG_SPI_NOR_IDLE_IN_DPD but later modifications
added acquire_device() and release_device() calls
earlier in spi_nor_configure() and the release_device()
function will have already done the enter_dpd().
Signed-off-by: Mike J. Chen <mjchen@google.com>
The BIG handle for an ISO sync receiver is provided by the host. The
valid range is [0x00..0xEF], and this requires the controller to allow
non-consecutive handle numbering. This means that even if only one sync
set is supported, a BIG handle of ex. value 2 must be supported.
As the code uses indexing and range checking directly by handle, this
needs to be changed. Introducing the handle index, which sequnces the
handles such that index = 0 is always the "first handle", regardless
of value.
Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit adds a custom target to tests/crypto/mbedtls in
order to verify that MbedTLS auto-generated files are up to
date.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Instead of selecting legacy MBEDTLS symbols, use corresponding
PSA_WANT ones when possible (note: some legacy symbols do not
have a PSA correspondance).
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add "sha3.c" source file that was previously missing from
CMakeLists.txt and that has been added in MbedTLS 3.6 release.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Using MBEDTLS_PSA_CRYPTO_CLIENT to guard all PSA_WANT symbols is
not completely correct because:
1. the prefix MBEDTLS suggests that it's something related to
MbedTLS, while actually PSA APIs can be provided also
by other implementations (ex: TFM)
2. there might applications which are willing to use PSA APIs
without using MbedTLS at all. For example computing an hash
can be as simple as writing psa_hash_compute() and, if the
PSA function is provided thorugh TFM, then MbedTLS is not
required at all
Therefore this commit:
- moves MBEDTLS_PSA_CRYPTO_CLIENT to Kconfig.tls-generic since
that symbol belongs to MbedTLS
- adds a new symbol named PSA_CRYPTO_CLIENT as a generic way
to state that there is "some" PSA crypto API provider
- let MBEDTLS_PSA_CRYPTO_CLIENT automatically select
PSA_CRYPTO_CLIENT, since the former is an implementation of
the latter.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Now that support for all PSA_WANT symbols is in place, we can
enable MBEDTLS_USE_PSA_CRYPTO when MBEDTLS_PSA_CRYPTO_C is
enabled as well.
Note: this commit also moves USE_PSA_CRYPTO out of CRYPTO_C
dependency in config-tls-generic.h because TLS/DTLS/X509 modules
of MbedTLS can rely on *any* implementation of PSA crypto APIs
not only the MbedTLS one. TFM is for example an alternative
to this.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since PSA has several different symbols defined and since it's
better to keep them aligned with the current MbedTLS release,
a python script is used to generate both:
- Kconfig.psa
- config-psa-generic.h
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Adding a Kconfig and a header file to control which PSA features
are to be used from MbedTLS:
- new kconfig symbols are placed in a separate header file
(Kconfig.psa) and are guarded by MBEDTLS_PSA_CRYPTO_CLIENT. The
reason for this is that TLS/X509 can either rely on PSA functions
provided by MbedTLS (when MBEDTLS_PSA_CRYPTO_C is defined) or
TFM (when BUILD_WITH_TFM is selected). Therefore we could
not make these new Kconfigs depending on MBEDTLS_PSA_CRYPTO_C.
- by default all PSA symbols are enabled, but they can be
disabled by respective Kconfigs in order to reduce the image
size.
- the new header file (config-psa-generic.h) mimics what
config-tls-generic.h does for MbedTLS builtin symbols: it
enables a build symbol for every Kconfig one. The name is
kept identical in the 2 cases (a part from the initial CONFIG_
in order to simplify the mechanism).
- MBEDTLS_PSA_CRYPTO_CONFIG is finally enabled whenever there
is any PSA crypto provider (either MBEDTLS_PSA_CRYPTO_C or
TFM)
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Current on x86 & risc-v that implement stack trace, the
maximum depth of the stack trace is defined by a macro.
Introduce a new Kconfig:EXCEPTION_STACK_TRACE_MAX_FRAMES
so that this is configurable in software.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Selecting `CONFIG_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.
Added `arm64` to the `arch.common.stack_unwind.symtab` test.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The mepc register is the address of the instruction that was
interrupted, it will make debugging easier if we know the
name of the symbol, so print it if `CONFIG_SYMTAB` is enabled.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Selecting `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.
Updated the `stack_unwind` test to test the symbols in a
stack trace.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Use pyelftools to extract the symbol table from the
link stage executable. Then, filter out the function names
and sort them based on their offsets before writing into the
`symtab.c`, this is similar to how the `isr_tables` works.
To access the structure, simply include the new header:
```c
#include <zephyr/debug/symtab.h>
```
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The GPIO API performs unprotected RMW operations that
can cause glitching and race conditions when GPIOs are used by
different threads or ISRs.
Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
This patch removes all uses of the adv auto-resume feature in the host
bsim tests, except for the test of that feature itself, and instead
makes all adv starts explicit.
The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
k_sem_init() is called for every IPC message sent in
intel_adsp_ipc_send_message(). This has not had any side-effects
in upstream configurations, but has been linked to a failing
run of test_obj_tracking_sanity test case in downstream Zephyr
use.
Replace k_sem_init() with k_sem_reset() as this is more appropriate
API to reset the semaphore count, and ensure deterministic
behaviour in case a thread is waiting on the semaphore at time
of reset.
Suggested-by: Peter Mitsis <peter.mitsis@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
It made the build of
`samples/tfm_integration/tfm_psa_test/sample.tfm.psa_test_crypto`
break since the update of Mbed TLS to 3.6.0 (#71118), apparently because
`${ZEPHYR_BASE}` wasn't set, and the include doesn't seem to be needed.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This commit is to fix a warning which is reported in Coverity scan
after device runtime pm is enabled.
Signed-off-by: Roger Wang <roger1.wang@intel.com>
On i.MX RT11XX which has MIPI CSI-2 Rx, image data from the camera sensor
after passing through the camera pipeline (MIPI CSI-2 Rx --> Video Mux -->
CSI) will be implicitly converted to a 32-bits pixel formats. For example,
an input in RGB565 / YUYV (2-bytes format) will become an XRGB32 / XYUV32
(4-bytes format), respectively. Make changes to support this.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
In order to avoid defining almost the same overlays in the available
sample codes, tests and user applications, a common overlay file
per memory type is demonstrated under the boards dts folder.
Currently only the PSRAM interface is supported and the APS6404L
PSRAM QSPI memory device is demonstrated. In doing so, an
application code will only have to define another overlay file explicitly,
under application's board folder, to overwrite the default QSPI
controller's settings. In either case, users should explicitly
invoke the requested overlay files at 'west build' invokation
via the DTC_OVERLAY_FILE system variable.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
1. Update the clock control driver so it can update timing settings for
QSPIC2 following system clock transitions (translated based on
AHB AMBA bus clock).
2. Remove the QSPIC related subroutines and use the respective HAL API
which is now available.
3. Add support for PM (CONFIG_PM_DEVICE). This is required as QSPIC2
register file is powered by PD_SYS which is turned off during device
sleep and so registers contents are lost (in contrast to QSPIC which
is used to drive the flash memory).
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Add support for the memory controller by utilizing QSPIC2. The latter is
capable to drive both NOR and PSRAM memory devices. For this to work,
the RAM driving mode is enabled.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This sample demonstrates the implementation of an (industrial) IoT
sensor/actuator device. The application uses the MQTT protocol to
securely send sensor data to a remote MQTT broker, while responding
to commands received over the MQTT connection.
Signed-off-by: Jason Murphy <jason.murphy@analog.com>
Add runtime power management suppor to the STM32 SPI driver. This allows
the driver to be suspended when not in use, and as a stop effect removes
the need to suspend/resume around each transition to stop mode.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit should add all the functionality needed for the crypto
driver to work when PM is enabled.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
With this change, bss/noinit sections are excluded from generated
kernel binary. Smaller image size saves storage space and reduces
loading time.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
This commits reverts two targets back to the default prompt in the Shell
Sample:
* intel_socfpga_agilex_socdk
* intel_socfpga_agilex5_socdk
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The ztest stack was to low to execute tests on some platforms (spotted
on nrf52840dk/nrf52840), hence increase it.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a missing space in the regular expression that defines the expected
console output so that it matches what the sample actually produces.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fix for uart_pm/src/main.c:106:23:
error: 'rxbuf' may be used uninitialized [-Werror=maybe-uninitialized]
string.h:62:10: note: by argument 2 of type 'const void *' to 'memcmp'
62 | int memcmp (const void *, const void *, size_t);
| ^~~~~~
tests/drivers/uart/uart_pm/src/main.c:69:17: note: 'rxbuf' declared here
69 | uint8_t rxbuf[32];
| ^~~~~
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Modify the SMF such that state transitions from parent states choose the
correct Least Common Ancestor based on the transition source rather than
the current state.
SMF set as experimental.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
The --flash-before flag allows devices to be flashed before the serial
connection is established. However, the implementation was incomplete and
only worked if the port address already existed at the start of the run.
This is incompatible with devices that implement the USB in software
(eg: USB-CDC).
This commit fixes the implementation to delay setting up the connection
until after the device is flashed, and to retry the connection for two
seconds after flashing to give the device time to enumerate as a USB
device.
Signed-off-by: Mike Szczys <mike@golioth.io>
Updates z_smp_global_lock() to follow the pattern used in spinlocks
to relax the loop between atomic_cas() attempts.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When the interface goes down, the safest thing to do is to return to
the INIT state, as there is no guarantee that any state is preserved
upon the interface coming back up again.
This is particularly the case with WiFi.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Added initial board support for the
frdm_ke15z board.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
Adding supporting soc files for the ke1xz platforms
updating soc.yaml and kinetis soc files
to support ke1xz.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
Updated the west.yml file to add pinctrl support
required for the frdm_ke15z board.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
ioctl() API expects error codes to be returned as negative value directly,
instead of using 'errno'. Fix ZFD_IOCTL_POLL_PREPARE handling to respect
that.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
There is a goto statement with conversion using errno_from_nsos_mid(). Use
NSOS_MID_ERRNO instead of ERRNO to return proper error code.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Two pins assigned to SPI controller (P0_22,P0_23) are dedicated
to XTAL32K which is present on devkit.
For this reason SPI function are re-assigned to pins available
on optional header MikorBUS 1 to match configuration of SPI2
which is routed to MikorBUS 2 header.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Commit 5871ff010b
added support for generated DT macros to get the number
of child nodes of a node, but we forgot to update
the documentation of the augmented Backus–Naur form
of the DT macros to reflect this addition.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This test runs fine in "native" targets
based on the toolchain and C library filtering.
As there is no need to exclude this architecture,
let's remove the exclusion to improve coverage.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This board HW models now include the RRAMC, FICR and UICR.
Let's update the docs accordingly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The RRAMC is now supported by the HW models.
Let's enable the RRAM controller, and
add a storage partition definition which
tests and samples can use by default.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In simulated targets the RRAM is not allocated
starting at address 0x0, but on an area allocated
at runtime.
Let's support this, to enable running the
real RRAM driver for simulated targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the HW models module to:
36b12714a5ed32450d907c89bb118f6280da3483
Including the following:
* 36b1271 54L15: Added RRAMC, RRAM & UICR
* b60af23 FICR 54L: Added first version
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove all the hard-configured absolute addresses and zillions of tiny
ELF segments in favor of the auto-generated vector region, which is
guaranteed correct as long as core-isa.h is matched to the target.
Signed-off-by: Andy Ross <andyross@google.com>
Existing solutions for linking the Xtensa vector table are a
cut-and-paste mess of inherited code, with more than a dozen special
sections that need to be linked into many special MEMORY{} regions.
Accept the existing convention used by C/asm code, but automatically
detect the needed offsets for the platform from core-isa.h (it can
share the preprocessing with gen_zsr.py) and emit a file that can be
included in lieu of all the existing boilerplate.
Signed-off-by: Andy Ross <andyross@google.com>
With the introduction of the new Hardware model, we now have an easy
method to describe variants of boards. This is especially helpful for
Microchip's PolarFire SoC Icicle Kit which has a heterogeneous
core-complex. Introduce an SMP capable variant with four SMP capable
harts for the SMP cluster and disables the e51 monitor hart
Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
Use Link Time Optimisation (LTO) when building Controller
with Isochronous channels support.
nRF53x SoCs has 256KB flash and using speed optimisation,
which is the default today, overflows flash when adding
new features related to ISO support.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added build time coverage for added new Controller
optimization related Kconfigs.
New Kconfigs are either covered in samples.yaml or in the
tests/bluetooth/init conf files.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Support for using Link Time Optimization (LTO) when
building application with open source Bluetooth Low
Energy Controller. This reduces code space usage.
Current Memory Usage at the time of this PR (hci_ipc):
BT_CTLR_OPTIMIZE_FOR_SPEED:
Memory region Used Size Region Size %age Used
FLASH: 260112 B 256 KB 99.22%
RAM: 60136 B 64 KB 91.76%
SRAM1: 0 B 64 KB 0.00%
IDT_LIST: 0 B 32 KB 0.00%
BT_CTLR_OPTIMIZE_FOR_SIZE:
Memory region Used Size Region Size %age Used
FLASH: 232292 B 256 KB 88.61%
RAM: 60128 B 64 KB 91.75%
SRAM1: 0 B 64 KB 0.00%
IDT_LIST: 0 B 32 KB 0.00%
BT_CTLR_OPTIMIZE_FOR_APP_DEFAULT:
Memory region Used Size Region Size %age Used
FLASH: 232292 B 256 KB 88.61%
RAM: 60128 B 64 KB 91.75%
SRAM1: 0 B 64 KB 0.00%
IDT_LIST: 0 B 32 KB 0.00%
BT_CTLR_LTO:
Memory region Used Size Region Size %age Used
FLASH: 221484 B 256 KB 84.49%
RAM: 60120 B 64 KB 91.74%
SRAM1: 0 B 64 KB 0.00%
IDT_LIST: 0 B 32 KB 0.00%
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove legacy LL optimize for speed dependency required to
support encryption feature in Controller where crypto was
performed in highest priority ISRs to setup encryption in 3
radio events (this now requires 5 radio events in split LL).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
As new channels are added to the `enum sensor_channel`, some
of the newer channel aren't updated in the whitelist of rtio
decoder.
Instead of specifying every channel in the list, do:
1. Verify that the `channel` is valid
2. cherry-pick the channels that require special handling, i.e.
1. `three_axis_data`
2. `byte_data`
3. `uint64_data`
3. handle the remaining `channel` in the default case as
`q31_data`
to make sure that all channels are handled.
Updated the pytest to get channel 32, previously nothing would
happen for this channel as there isn't a decoder for it, now
it would return:
```
channel type=32((null))
```
the channel name is NULL because it wasn't added to the channel
name look up table in the sensor_shell.c, that is being fixed
in #72815.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit adds support for the I2C which
can be found in Apollo3 SoCs, it can work in
both DMA and non-DMA modes
Signed-off-by: Hao Luo <hluo@ambiq.com>
k_thread_stack_free syscall was not checking if the caller
had permission to given stack object.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There's such a case captured. When log immediate mode is enabled, each log
message is output per character. However, "log_output_flush()" function is
still called with zero data length at the end of "log_output_process()".
Better to make "buffer_write()" returns immediatley if buffer data
length is zero.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Normally main.c file doesn't have a header file, because it doesn't
need to declare any interface to other modules.
In this sample, it makes more sense to put all the relevant macro
definitions in main.c directly.
Signed-off-by: Paul He <pawpawhe@gmail.com>
The STM32 temperature, battery and voltage reference sensors needs to
write the ADC common registers to enable the corresponding ADC features.
For that we need to ensure that the ADC is not suspended by using the
pm_device_runtime_get/put methods.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
RISC-V PMP implementation supports isolating thread stacks
within the same memory domain, and also is the only
supported operating mode. So select the corresponding
kconfig by default.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
ARM MPU implementation supports isolating thread stacks
within the same memory domain, and also is the only
supported operating mode. So select the corresponding
kconfig by default.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This uses the newly introduced CONFIG_MEM_DOMAIN_ISOLATED_STACKS
to determine whether to proceed with the tests to access other
threads' stacks. This provides more precise control on when to
run or skip these tests.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a new kconfig to indicate if architecture code
supports isolating thread stacks within the same domain,
and another new kconfig to selectively enable this
behavior.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This value isn't used outside of the PM subsystem, so don't build it.
More important than the four bytes of .bss was the use of an
atomic_inc(). Some platforms are forced to use
CONFIG_ATOMIC_OPERATIONS_C (but in almost all cases are single-core
devices that won't use atomics at runtime). There, this turns into a
function call that pulls in the whole atomics implementation.
Signed-off-by: Andy Ross <andyross@google.com>
Opcodes were not documented. Also removed init function from
public documentation as it is not needed there.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Added more doxygen comments to ieee802154 radio header file in
order to improve documentation coverage percentage.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Documentation to various public features was missing.
Also some of the public features were marked in hidden section.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add test case for mipi csi2rx driver. As this driver selects the csi
driver, the csi node has to be enabled as well.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add driver to support NXP MIPI CSI-2 Rx which is a MIPI CSI-2 receiver
connecting a camera sensor to the NXP CSI. This IP is present in the
i.MX RT11XX series.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add bindings for NXP MIPI CSI-2 Rx which is a MIPI CSI-2 receiver
connecting a camera sensor to the NXP CSI.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
TLC59731 is a 3-Channel, 8-Bit, PWM LED Driver with
TI Single-Wire interface (EasySet) protocol.
Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
Convert the ST7735R display to use the MIPI DBI API. Boards and overlays
using this display are also updated.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Require that SPI config within the MIPI DBI API use 9 bit SPI mode, as 3
wire spi requires the command/data bit be packed into the start of the
SPI packet.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The RTXXX and RW61X DT are using syscon compatible
depsite not having a syscon. This is a technical debt
to remain aware of. The reason they use these compatibles
is to use the syscon driver which is a shim to an SDK API
that is somewhat similar to syscon.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Include reset device binding in some of the NXP LPC
IP bindings to be able to add the resets property.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add _OR versions of all the reset_dt_spec macros.
Also bump the API version to 0.2.0 (unstable) since
there are multiple implementations of this API.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add binding representing the peripheral reset controller
of the NXP LPC SYSCON heritage hardware including SYSCON
itself and the newer RSTCTL.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Clarify that there needs to be a cell named "id" in order
to be usable by the reset controller macros.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
If time aware system has more than 1 gptp port, because there is only
one boolean to handle callback registering, a race condition can occur
for instance in case 2 master ports are waiting for a timestamp following
sending of sync message. More in details, callback may be unregistered
by port 1 while port 2 is waiting for timestamp event.
The issue is solved by declaring as much as boolean and struct
net_if_timestamp_cb as the number of declared ports
(=CONFIG_NET_GPTP_NUM_PORTS).
Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
Setting a ration of 0 breaks the computation of scaled_rate_offset
in gptp_md_follow_up_prepare().
According to IEEE802.1AS 10.2.2.3.9, when sent by clock master
entity, rate_ratio shall be equal to gmRateRatio. But since
in gptp_md_follow_up_prepare(), in case we are the grand master
clock, we take the assumption that clock source is the local clock,
we may set this ratio to 1.0.
Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
Without this patch, in case time aware system is grand master capable
but is not the grand master clock and behave as a bridge so that it
shall ONLY relay SYNC and FUP messages from slave port to master port(s),
SYNC and FUP are mistakenly generated by ClockMasterSyncSend state
machine.
This patch only call ClockMasterSyncSend state machine in case a Grand
Master clock is present and is this time aware system.
This check is not described by IEEE802.1AS. Instead, according to
10.2.9.3, the SiteSyncSync state machine shall not take into account
information from ClockMasterSyncSend in case this time aware system is
not grand-master capable. Current implementation of ClockMasterSyncSend
state machine sends sync indication to the PortSync entities, instead of
sending it to the SiteSyncSync entity. And the SiteSyncSync state machine
does not make any check.
Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
Commit 413eceeddb ("net: gptp: fix follow_up message correction_field")
breaks computation of follow up correction field in case time aware system
is not the grand master clock but behave as a transparent clock which relay
sync and follow-up messages from one slave port to one or several master
port(s). In this case, according to IEEE802.AS 11.1.3 and 11.2.14.2.3,
md sync send state machine shall compute the sum of link propagation delay
and residence time, expressed in grand master time base. Then this quantity
shall be added to last received fup correction field to build value of
correction field. This patch checks whether time aware system is the grand
master clock or not, and computes value correction field accordingly.
Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
Add header file for flash configuration blocks
which is an image header consumed by the RW bootrom.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
First version of RTIO-compatible nrfx_twi driver.
Test Setup:
- Board: nrf52840dk
- Test: `tests/drivers/i2c/i2c_ram`
- Additional Kconfig: `CONFIG_I2C_RTIO=y`
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Updating net-tools to latest version in order to get the
missing dnsmasq.conf file to Docker.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Do not end except block with a useless return, use a pass instead. This
fixes pylint R1711: "Useless return at end of function or method
(useless-return)".
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add "west build" argument for specifying shields. This saves users from
having to do "west build ... -- -DSHIELD=...", making shields a much better
integrated feature.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add example snippet argument to usage output of the "west build" command
and use the singular "SNIPPET" in the generated help text.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove `bt_l2cap_le_endpoint.init_credits` that has zero uses and is
just taking up RAM for no reason.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Add new Microchip MEC chips using the new MEC5 HAL and
add a HAL version of a legacy chip named MECH172x.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Add support for the goworld 16880 display module. As this display module
only features an FFC cable, it is added as a board overlay for the RW612
BGA. This module uses an ST7796S display controller as well as an FT7401
touch controller (which is managed by the FT5336 input driver)
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.
Signed-off-by: Lucas Romero <luqasn@gmail.com>
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.
Signed-off-by: Lucas Romero <luqasn@gmail.com>
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.
Signed-off-by: Lucas Romero <luqasn@gmail.com>
Reschedule from '6:25 and 18:25, Monday-Friday'
to 'everyday at the same time'.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Added ioannis-karachalios as maintainer in
the hal_renesas
Moved andrzej-kaczmarek to collaborators and added
blauret as collaborator too.
Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for TEST_USERSPACE, so set CONFIG_TEST_USERSPACE=n.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Allow to provide from CLI, threshold value for number of test case roots
selected for execution base on changed files.
When such threshold will be exceeded, full scope will be executed.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
An earlier pull request implementing observe support was merged too
hastily. It had a few issues:
1. The predicate for whether a request should be marked not ongoing was
wrong (it checked ret != 0 instead of ret < 0)
2. Without observes in mind, MID-based deduplication is not a required
feature. Deduplication was handled implicitly - the exchange would get
dropped after the first response anyway, so duplicate responses would
not get matched to anything. But with observes, there are several
responses in an exchange. This commit adds this.
3. Using coap_request_is_observe(&internal_req->request) in the response
handler requires the whole request to stay in scope for the lifetime of
the observation, which I observed was not always the case. Adding an
is_observe bool to the internal struct improved stability significantly.
With these fixes, GETs with observe option works very well.
Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
The NXP Kinetis temperature sensor depends on CONFIG_ADC. Make the driver
Kconfig select CONFIG_ADC to get better CI coverage (enabling the driver
when CONFIG_SENSOR is enabled without depending on CONFIG_ADC=y).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Corrected virtual memory size to match the range supported by the
Translation Lookup Buffer. The TLB size is 16 MB, however the first 128 KB
is dedicated to LPSRAM and bypasses the TLB. This was taken into account in
KERNEL_VM_BASE, so KERNEL_VM_SIZE was reduced accordingly.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
For the choice ETH_STM32_HAL_API_VERSION, both options
ETH_STM32_HAL_API_V2 and ETH_STM32_HAL_API_V1 had the same
prompt "Use new HAL driver". This commit fixes the prompt for the
legacy driver.
Signed-off-by: Charlie Gilliland <charliegilly1@gmail.com>
- Fix mcxn94x flash write-block-size from 16 to 128.
- Fix flash_program() return error 0x65,
that means "Address or length does not meet the required alignment."
- The mcxn94x Flash ROM API flash_program() start address and
the length must be 128 bytes-aligned.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The bt_csip_set_coordinator_csis_member_by_conn function
was seemingly missing, causing the CAP unit tests to not build.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The values set as a min_ram requirement were far from the actual RAM
usage reported during build, make them more realistic.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
As native_posix is no longer supported, due to incompatibility with
CONFIG_POSIX_API, remove a dedicated config for it.
A config for qemu_cortex_m3 needed to enable RNG, as otherwise it's not
available for the platform and gives build error.
Finally, enable qemu_cortex_m3 build in the CI.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
These are safety checks to guard against silent data corruption. The
implementation currently does not clobber bufs, but soon it will. The
bufs will be zero-copy segmented and fragmented, which involves
overwriting already-sent contents with headers for the next fragment.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Changes the parsing of boolean input parameter "PolicyApply"
to DFD start command to use shell boolean parse library.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
port infineon CAT1A (psoc6) to HWMv2:
1. move dts\arm\cypress\** to dts\arm\infineon\cat1a\legacy
2. remove dts\arm\cypress\**
3. rename dts\arm\infineon\psoc6 to dts\arm\infineon\cat1a
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
In the current driver, the longest time of the watchdog timeout is ~8
seconds because the pre-scalar is fixed at 32 (WDCP=5). This commit
removes this limitation by dynamically calculating the pre-scalar
according to the watchdog timeout setting from the API.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Adds a missing network include file which was causing an undefined
function build failure, likely caused by a recent change affecting
includes in other header files
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Declutter `fatal.c` by moving the stack unwinding logic into
`stacktrace.c` and guard its compilation with `CMakeLists.txt`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The script runs as part of the build now. Use that feature and
remove the old static file from the manually-run script.
Signed-off-by: Andy Ross <andyross@google.com>
The original code would (unsurprisingly) only emit handler functions
for interrupt levels with interrupts associated with them. But it
turns out that it's possible to configure an xtensa device with an
empty-but-otherwise-real interrupt level (specifically mt8195 has a
"Level 3" interrupt not associated with any input IRQS, it's one level
above EXCM_LEVEL and one level below the DEBUG exception).
This script is old, and not set up to parse the full core-isa.h
directly, so modifying it to detect this condition is difficult.
Instead, just emit all 15 possible interrupt handlers, even empty
ones. The extra stubs are harmless as they'll be dropped if uncalled.
Signed-off-by: Andy Ross <andyross@google.com>
Some oddballs cores can be generated without an "NMI" interrupt, in
which case core-isa.h will not define XCHAL_NMILEVEL. This code is
trying to unconditionally mask interrupts, so XCHAL_EXCM_LEVEL is the
pedantically correct choice anyway (NMI's by definition, cannot be
masked).
Signed-off-by: Andy Ross <andyross@google.com>
The script to generate the _soc_inthandlers.h header has been run
manually for years, only because I was a cmake novice at the time and
unsure how to integrate it into the build. So every new platform has
to find the script and template file and figure out how to generate
the file. And in a few cases it looks like we've tried to EDIT the
resulting files in the tree.
Let's finally do this right. The file is now dropped (for every
xtensa platform) as a "xtensa_handlers.h" file, and there is a Kconfig
to control whether the original/manual file or the new one is used by
the platform code. We can migrate the other platforms slowly as
people have time to validate.
Signed-off-by: Andy Ross <andyross@google.com>
The temperature being computed using a float variable, use
sensor_value_from_float() instead of sensor_value_from_double(). This
saves some flash.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit updates the codecov workflow to specify the full coverage
report file path under `files` because codecov-action v4 does not correctly
process the `directory` parameter.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Previous value just activated the ability to trigger for both edges,
without (de)-activating the gpio. This caused an assrtion error in GPIO.h.
Fixes#71227
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
Currently __INT64_C() doesn't add any suffix to provided constant which
causes the constant to have 'int' type. On the other side, __UINT64_C()
adds ULL suffix which makes the constant 'unsigned long long'.
Of course, __INT64_C() is wrong here because 'int' type, in most cases,
has 32 bit width.
According to the C standard, these macros are for minimum-width integer
constants. For example, it means that using INT16_C() macro will give
you constant with type the same as 'int_least16_t' type.
Clang doesn't provide defines like __INT_LEAST16_C_SUFFIX__, which makes
implementation difficult, because we need to determine appropriate type
first.
Signed-off-by: Patryk Duda <patrykd@google.com>
Using '#ifndef' before defining a macro is a good way to provide default
version of the macro if not defined elsewhere. But it has some
disadvantages:
- It hides information about the users of these macros. It's hard to
determine when this implementation is used.
- Correctness depends on file including order.
It looks like these macros are used only by minimal libc and only if
ENFORCE_ZEPHYR_STDINT is not selected. We expect other libc to provide
their own implementation.
Signed-off-by: Patryk Duda <patrykd@google.com>
Zephyr minimal libc implements integer constant macros using internal
headers provided by GCC, for example INT64_C(x) is just a __INT64_C(x)
which is implemented by the GCC.
Clang compiler doesn't provide these definitions, so we define them
(__INT64_C() and INT64_C()) in zephyr/toolchain/llvm.h, but it looks
like INT64_C() definition doesn't come from llvm.h, but from stdlib.h
despite of checking if __GNUC__ is defined.
This is because Clang sometimes pretends to be GNU compiler:
$ x86_64-pc-linux-gnu-clang -dM -E - < /dev/null | grep "GNU"
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 4
Let's keep the integer constant macros in stdlib.h and their
actual implementation in llvm.h. Also define these macros if __clang__
is defined, just in case.
Signed-off-by: Patryk Duda <patrykd@google.com>
Terminate QEMU earlier if the test finishes and no output data is
received for 1 second. This new timeout operates in parallel with the
global test timeout.
For coverage testing, this can reduce the time spent running individual
tests by up to 29 seconds, while still giving the full 30 extra seconds
to dump gcov data if needed.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Let the callback execute after the interrupt status has cleared.
Because if the callback is executed before the interrupt status
is cleared, it might cause subsequent counter interrupts to fail to
trigger due to the callback function taking too long to execute.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
Add a new option to split off the building of the HCI layer of the
controller. This layer is not needed by the controller unit tests, and
becomes problematic with the planned change to use devicetree for HCI
drivers.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
The adv auto resume feature is planned for deprecation. This new define
is the new default applications should use.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Fix undefined reference to mbedtls_pk_ecc_xxx functions following update
to latest mbedtls version.
Signed-off-by: Joel Guittet <joelguittet@gmail.com>
select modem backend statistics and enable shell in cellular
modem sample. This will help advertise the feature, and can
help quickly identify issues with to small buffers.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add statistics module which tracks the usage of modem backend
transmit/receive buffers if implemented by a backend.
A modem backend may register itself to the modem backend
stat module, and advertise its transmit and receive buffer
sizes and momentary usage (length).
The modem backend module tracks the maximum usage, which can be
output to the shell using the "modem_stats buffer" shell command.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Changes the log level from ERR to DBG for element_model_recv for the
following cases:
- Element does not have the appkey for incoming message.
- Element does not have destination address for incoming meesage.
When the received message is for a group address, element_model_recv
is called for all elements on the device. One or more elements may contain
a model that is subscribing to this address. If more than one element
contains the same model. but they do not all share the same application
key as the incoming message is encrypted with, or they do not all
subscribe to the same group address, then the log will show error
message for these elements, which is misleading.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
Add tests verifying valid IPv6 ND behaviors on interface state changes,
specifically:
* Verify RS is sent, and upon RA reception prefix and autoconf address
added accordingly.
* DAD is triggered for autoconf, static and LL IPv6 addresses.
* IPv6 address is not used upon DAD conflict.
* IPv6 neighbor discovery works as expected.
* Multicast transmission/reception is functional after interface state
changes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
One of the test interfaces is defined as Ethernet interface, however it
was missing ethernet_init() call, hence for example interface flags were
uninitialized. This can cause issues with multicast tests, as
NET_L2_MULTICAST flag was missing on the interface.
Additionally, Ethernet-type interfaces should use struct
ethernet_context as a base for their context data, otherwise Ethernet L2
will reach to some rubbish memory locations.
Finally, since the interface now defines correct flags, all-nodes
multicast address is now added to the interface automatically as a part
of ND logic. Therefore, skip adding that address manually from
ipv6_setup().
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Restore the original LL address on the interface after tests, instead of
generating a new one, to avoid dangling link-local IPv6 on the
interface.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add more test cases verifying that MLD events/reports are sent
accordingly when interface state changes.
Introduce separate semaphores for waiting for network events, as having
a single one for transmit and events is ambiguous in tests.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Filtering out received packets which source address matches one of our
own addresses has broken the duplicate address detection conflict
reporting.
In case Neighbor Advertisement is sent during DAD collision, the source
address of such packet might be set to the address that triggered the
collision. This address would also be set on our interface, marked as
tentative. Therefore in order to make duplicate address detection work,
we cannot filter out packets in case our own address is still in
tentative state.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This fixes the SPI DTS bug on the nrf5340_audio_dk board
which was introduced by b8978e9:
unit address and first address in 'reg' (0x0) don't match
for /soc/peripheral@50000000/spi@a000/sdhc@1
unit address and first address in 'reg' (0x1) don't match
for /soc/peripheral@50000000/spi@a000/cs47l63@2
Signed-off-by: Tim Sørensen <tims@demant.com>
A support for RDNSS option should not force DNS subsystem being enabled
in the system, especially that the option is enabled by default. It
should work the other way around - the option is supported only if DNS
was enabled by the user.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Because of include file changes, we now need to include both
hostname.h and net_if.h in the syslog logging module directly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The native_posix board does not work well with eventfd so disable
it with tests that use socket service API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The LOG_MODULE_REGISTER() was not called anywhere so if one tried
to enable logging, there was a linker error about missing logger
functions.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add CONFIG_NET_TEST=y to make the test self contained and not
trying to create native_posix Ethernet interface which will
normally fail.
This prevents this error from printing
[00:00:00.000,000] <err> eth_posix: Cannot create zeth (-1)
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Because of changes in other network header files, the net_if.h
was not included so add it directly to the echo-client and
mqtt_azure sources.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The CONFIG_MAX_THREAD_BYTES=3 needs to be set otherwise this error
is printed by CI.
Too many thread objects (17)
Increase CONFIG_MAX_THREAD_BYTES to 3
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
With native_sim, this error is seen a lot when socket
service API is used.
<dbg> net_sock: get_sock_vtable: (net_socket_service):
Invalid access on sock 3 by thread 0x807a8e0 (net_socket_service)
If we just ignore the error, then we might get into forever
loop which is not good. So if this happens, mark the eventfd
fd as not pollable to basically ignore the eventfd support in
this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Print also thread name when printing socket access error.
This helps debugging what thread caused it.
Lowering the Error to Debug as we could be missing vtable
for example for eventfd descriptors, this is easily seen when using
socket service API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Instead of using net_context API directly, the LLMNR responder is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Instead of using net_context API directly, the mDNS responder is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Instead of using net_context API directly, the DNS resolver is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
With this configuration of the device tree, we use 80 MHz as
a FDCAN bus clock. This configuration allows to pass the tests.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Ensure that in LLCP reference to node_rx is cleared when
retention is NOT used, to avoid corruption of node_rx later
re-allocated
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
In case a CPR is intiated but rejected due to CPR active on
other connection, rx nodes are leaked due to retained node not
being properly released.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
In the case where a test causes the test executor to crash, the stderr
is currently lost, making it hard to debug failures. This changes it
so that the process' stderr gets captured to 'handler_stderr.log' for
inspection.
Signed-off-by: Benjamin Gwin <bgwin@google.com>
Merge codebases of cavstool.py and acetool.py as the two have
a lot of duplicated code.
To ease with transition, keep acetool.py around with implementation
imported from cavstool.py. This will help to keep any automated
testing flows working that assume both tools exist.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add driver for Festo VEAA-X-3 series proportional pressure regulator.
The driver assumes that the maximum ADC value matches the maximum
output from the device, and that the maximum DAC value matches the
maximum input value for the device. External hardware is probably
required between the ADC/DAC and the device.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
The ISO API and implementation have existed in Zephyr
for several years, and while not fully qualified, stable
or tested yet, it's not experimental anymore (and have
not been for a long time).
This commit removes any references to it being experimental
and instead defines it as unstable by setting the version to
> 0.1.0. 0.8.0 is being used as the initial version, as that
is what other unstable modules was defined to have as their
initial version if they were not stable (>= 1.0.0).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds 2 tests for ISO broadcast.
First test is just a minimal test that sets up a BIG,
transmits data and verifies that it is being received
on the ISO sync receiver.
The second test creates a BIG, disables BT, enables BT,
and the verifies the above.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If bt_conn_set_state(conn, BT_CONN_DISCONNECTED) is called
while the connection is already disconnected, this triggers
a warning. This is likely to happen when bt_conn_cleanup_all
is called as part of bt_disable.
Added the state check to avoid unnecessary warnings in the log.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for bt_disable in the ISO implementation.
This involves clearing all information related to states
in the controller, such as the BIGs and CIGs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
MetaWare toolchain doesn't support building Zephyr with
Picolibc module. This PR fixes biuld process by turning off
picolibc support on compiler side.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
The sys_bitfield_(clear/set)_bit() work on pointer size element.
However, _thread_idx_map[] is a byte array. On little endian
systems, the bitops should work fine. However, on big endian
systems, changing the lower bits may actually be manipulating
memory outside the array when CONFIG_MAX_THREAD_BYTES is not
multiple of 4. So modify the code to perform bit ops on
a per-byte basis.
Fixes#72430
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since the CSIP API expects a set member struct for nearly all
functionality, the reference to the full set member (along with
the CAS specific CSIS) should be given to the application.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The input address originates from an RX net_buf which may
be unaligned. Consequently, word access to this unaligned buffer
can trigger an unaligned access exception on certain platforms,
such as the ARMv7 Cortex-A9.
Signed-off-by: Taras Zaporozhets <zaporozhets.taras@gmail.com>
Fix async configure function not being called
when the irq driven api is not used, which
both causes a build warning and would not
work at runtime.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
DWC2 documentation unfortunately assigns somewhat confusing semantics to
endpoint "enable"/"disable" and "activate"/"deactivate". The Zephyr USB
device stack endpoint enable/disable refers to DWC2 activate/deactivate.
The DWC2 endpoint enable/disable actions can be loosely referred to
Zephyr USB stack enqueue/dequeue.
Rename the functions and rework internal working to match DWC2
Programming Guide. This makes endpoint halt work as expected by the
stack and therefore fixes all classes that rely on correct STALL
handling. Most notable STALL user is the Mass Storage class.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
DWC2 programming guide mentions that SETUP can only be processed by
application after DOEPINTn.SETUP interrupt. Not respecting this
requirement makes setting Global OUT NAK hang while waiting for
GOUTNAKEFF interrupt until the host starts next control transfer.
Global OUT NAK is necessary if the application ever wants to properly
cancel any ongoing transfer.
Change the processing to comply with the programming guide.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit should fix the followings:
1. When an alarm event is initialized, the driver should only
consume the valid alarm fields, based on the given mask.
Otherwise, the driver should use default valid subfield
values.
2. Setting an alarm event should not return with error code
if the timer and/or calendar counters have yet to be
initialized, explicitly. Instead, a log warning should be
issued.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
The power rail of a peripheral block should always be
acquired/released before/after its employment even if
it's known that it should already be up and running.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Fixes: #27439
This commit introduces an initial SoC porting guide with a general
description of the minimal set of files needed to support a new SoC in
Zephyr, along with some examples of the content.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Remove the "snps,designware-spi" compatible from the EXMIF node in
nRF54H20i, as the spi_dw driver cannot be used for this peripheral
without Nordic-specific modifications that are not present upstream.
An attempt to do so (just setting CONFIG_SPI=y will cause that,
as the driver initialization function will be executed then) results
in a bus fault.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Improve navigability in the documentation by adding a link to the main
HTTP Server documentation page to the HTTP Server sample.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-17 14:38:15 -05:00
2034 changed files with 46768 additions and 15504 deletions