Fail TxFIFO write if the endpoint is not activated, because there is
essentially no fifo assigned. Writing to not activated endpoint is
possible, but it does tend to corrupt fifo number 0 which is used for
control transfers. USB stack should not really be attempting to write to
endpoints that have not been activated (ep_enable called).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Store SOF frame number and use the information to set the Even/Odd
microframe bit when enabling isochronous endpoints. Reject received
isochronous data if number of packets received does not align with
received PID.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
RxFLvl interrupt should only handle the actual data movement from RxFIFO
to the buffer. OUT transfers are completed in XferCompl handler both in
DMA and Completer mode. This reduces code size by avoiding having
separate code paths based on operating mode.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Function dwc2_set_dedicated_fifo() calls dwc2_flush_tx_fifo() before the
diepctl register is written. The register will be only written after the
dwc2_set_dedicated_fifo() finishes. Solve the problem by passing fifo
number directly instead of endpoint address to dwc2_flush_tx_fifo().
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add all register bit defines necessary for isochronous transfers. Clean
up the endpoint transfer size register defines clearly separating IN and
OUT registers because they do use different bit fields. Add alternate
bit names for bits that do have different meaning based on configured
endpoint transfer type.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The clang-format check outputs a git diff with surrounding context. It
naively removed the first and last 3 lines, but this does not work if
there are less lines.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the pyocd runner flash command.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The terminal offset for subcommands' help text isn't
computed correctly, fix it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
- Use `SHELL_CMD_ARG_REGISTER` for the main cmd to state the
required number of arguments, this helps to remove the
runtime check from the command, and also print the help
message to the terminal when the argument count is
unexpected.
- Some changes to the help text that hopefully makes the
mandatory and optional arguments more obvious to the user
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Reset delay was not being calculated correctly in lcdic driver, the
ticks field needs to be accessed directly within the timeout structure
to calculate the correct delay time
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Exclude RW612 based boards from the WiFi testsuite, as these boards
require binary blobs be downloaded in order to build as expected
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The driver in tree is for u-blox M8 devices, not M10. The M10 series
devices (from Protocol Version 23.01) use a different, non backwards
compatible interface for configuring the modem behaviour.
Of the two boards tested in the original PR, the "VMU RT1170" is
explicitly listed as having a u-blox NEO-M8N modem, while I have
been unable to find any information online about the "FMURT6" board.
Leaving the naming as-is will cause problems when M10 drivers are
contributed.
Signed-off-by: Jordan Yates <jordan@embeint.com>
disk_access functions were called from an interupt context, thus
crashing on mutexes (no sleep is allowed in interrupt context).
The usage of a spinlock is permitted. The functions guarded by
the spinlock are executed very quickly anyway, so the spinlock
is applicable.
Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
Usb "write" method never copies the input data buffer, it uses the
buffer pointer directly. The fact that it was on the stack made
the buffer ephemeral, and could disappear before the USB transfer
actually occurred. The data transmitted was then random. This commit
converts the transfer buffer to a static buffer, so that it always
exists for the duration of the USB transfer.
Known side-effect: if "read capacity" command is read twice
simultaneously, the same buffer will be used twice. As the capacity of a
USB drive should not change between 2 calls, this side effect can be
ignored.
Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
This provides memory mappings with the ability to be initialized in their
paged-out state and be paged in on demand. This is especially nice for
anonymous memory mappings as they no longer have to allocate all memory
at mem_map time. This also allows for file mappings to be implemented by
simply providing backing store location tokens.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
- Removed zero initialization of `pincfg` structure as all members
are guaranteed to be set.
- Introduced `pfs_cfg` as an intermediate variable to store data in
the CPU register instead of stack.
- Simplified pin setting logic by relying on `pfs_cfg` being
zero-initialized, eliminating the need for explicit bit clearing.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add power management support to various drivers:
- gpio-kbd-matrix
- ite,it8xxx2-kbd
- nuvoton,npcx-kbd
- microchip,xec-kbd
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add power management support to the keyboard matrix library. This
provides a generic pm_action function that changes the keyboard matrix
scan in two places when suspended:
- reset the state to 0 for all columns
- do not enable key press detection
This ensures that any key that was pressed when the device is suspended
is released, and no other scan happens until the device is resumed.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The latency_measure benchmark is designed for systems with a single
CPU. When the system allows for multiple CPUs, instead of forcing
a single CPU to be used via 'prj.conf', spawn a non-preemptible
thread to keep the other CPUs busy.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Update changes about `arch_stack_walk()` in RISCV, ARM64 & X86.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Having `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` to select the
`CONFIG_SYMTAB` or to explicitly not print the symbol name
during exception stack unwind seems unnecessary, as the extra
code to print the symbol name is negligible when compared with
the symbol table, so just remove it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Currently it supports `esf` based unwinding only.
Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.
Also, `EXCEPTION_STACK_TRACE_MAX_FRAMES` is unused and
made redundant after this change, so remove it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Currently it supports `esf` based unwinding only.
Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit introduces a new ARCH_STACKWALK Kconfig which
determines if the `arch_stack_walk()` is available should the
arch supports it.
Starting from RISCV, this will be able to converge the exception
stack trace implementation & stack walking features. Existing
exception stack trace implementation will be updated later.
Eventually we will end up with the following:
1. If an arch implements `arch_stack_walk()`
`ARCH_HAS_STACKWALK` should be selected.
2. If the above is enabled, `ARCH_SUPPORTS_STACKWALK` indicates
if the dependencies are met for arch to enable stack walking.
This Kconfig replaces `<arch>_EXCEPTION_STACK_TRACE`
2. If the above is enabled, then, `ARCH_STACKWALK` determines
if `arch_stack_walk()` should be compiled.
3. `EXCEPTION_STACK_TRACE` should build on top of the
`ARCH_STACKWALK`, stack traces will be printed when it
is enabled.
4. `ARCH_STACKWALK_MAX_FRAMES` will be removed as it is
replaced by `ARCH_STACKWALK_MAX_FRAMES`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Add `arch_stack_walk()` under the `arch-interface` group and
add documentation on how to add support for it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Fix missing implementation to handle Broadcast ISO MIC
failure during Broadcast ISO establishment, and during an
already established Broadcast ISO sync.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adding myself as maintainer because my employer Husqvarna wants to
upstream SiM3U support to Zephyr, and keep it well-supported.
Adding as collaborator M1cha, because he did the initial port and
Asmellby, jerome-pouiller, and jhedberg because they take care of
all Silabs products.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This is just the driver for banks 0 to 3. Bank 4 will come via a
separate commit since it needs a different driver.
Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>