Frame timeout is a hardware feature present in newer versions
of UARTE (e.g. in NRF54X platforms) for detecting idle state
on RX line and ending RX after configurable timeout.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Rework driver to support new way of asynchronous RX handling.
Previously RX was handled in two modes: using RXDRDY interrupt for byte
counting or TIMER + PPI. Both modes had flaws. RXDRDY interrupt mode
could miscalculated amount of received bytes when interrupt was not
handled on time. Data was not lost but was not reported on time that
could lead to issues. PPI+TIMER mode requires additional resources
thus it was not the default mode. Often user was not aware of that
option and was expiriencing driver RX faults.
New RX mode is switching buffers when there is new data (RXDRDY event
not set for given amount of time). It does not require additional
resources to get precise byte counting. Additionally, this is in line
with new UARTE feature (RX frame timeout) which is present in nRF54X
devices. The behavior of the driver is the same for legacy devices
and new one. For legacy devices k_timer periodic interrupts are used
to check if there are any new bytes and it is not needed when RX frame
timeout is present.
Improved RX mode is enabled by default
(CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y) but legacy modes are still
available though not recommended to be used.
Note that new RX mode (CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y) behaves
a bit different because timeout always triggers switch of buffers
which means that there will be no UART_RX_RDY events with non-zero
offset. It also means that every UART_RX_RDY will be followed by
UART_RX_BUF_RELEASED.
After rework, driver is recommended to be used for all platforms as it
performs much better and takes much less code than the second UART shim
available for Nordic devices.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Refactor RX asynchronous API function to use a pointer to the RX
async data structure instead of top level data structure pointer.
It improves readability with more concise code.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
1. add delay read config for platforms that has capacitor with pin
2. add dts pin flags to gpio_pin_config when output.
Signed-off-by: Hake Huang <hake.huang@nxp.com>
update boards that can not use the common pins
mimxrt102x reuse with ethernet
mimxrt106x has external pull up
lpcxpresso55s3x reuse with int
add CONFIG_SKIP_PULL_TEST by default to be more general
user can enable this test in customized case with select pin
ST prefer to using D9 D10 pair to testing.
Signed-off-by: Hake Huang <hake.huang@nxp.com>
As per USB 2.0 specification 7.1.5.1: The voltage source on the pull-up
resistor must be derived from or controlled by the power supplied on the
USB cable such that when VBUS is removed, the pull-up resistor does not
supply current on the data line to which it is attached.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Extend `footprint-tracking` CI workflow with two more steps:
* pack Memory Footprint data produced by `track.py` script
into Twister JSON footprint reports (`twister-footprint.json).
* upload Twister JSON footprint reports into ElasticSearch storage.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Add usage example for sys_trace_user_event, to demonstrate how users
could add tracing functionality to their application.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Document availability of sys_trace_user_event, for users who are trying
to add custom trace events to their application.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support for a "named event" trace. This trace is intentionally not
used by the system. The purpose of this trace is to allow driver or
application developers to quickly add tracing for events for debug
purposes, and to provide an example of how tracing subsystems can be
extended with additional trace identifiers.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Support the BMM150 being on a power domain, which may not be powered at
boot. For example, Nordic Thingy53.
Signed-off-by: Jordan Yates <jordan@embeint.com>
There is an (undocumented) additional delay necessary if the device woke
up and a measurement is triggered via the "force"-mode. The additional
sleep time was determined empirically on different devices.
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
Update power management to only start/stop periodic measurements in
`CONFIG_BME280_MODE_NORMAL`, instead of re-initialising the chip
completely.
In `CONFIG_BME280_MODE_FORCED`, there is nothing to do when suspending,
as the sensor is already in its lowest power mode.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Adds a new NOTRUN status, which indicates
that a test was successfully built, but
not run on account of being not
runnable in given test instance.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Add support for the Telit ME310G1 LTE modem which is very similar to
the ME910G1. Re-use the ME910G1's AT command scripts but rename
them to mex10_xx and define a shutdown script (AT#SHDN).
Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
Add a DTS binding file for Telit ME310G1 cellular modem based
on the binding for ME910G1 but without the mdm-reset-gpios as
the ME310 doesn't have a reset input.
Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
Add support to define a shutdown script for cellular modems, i.e.
AT commands to shutdown the modem. This allows to shutdown the
modem much quicker compared to using a power pulse which saves power.
Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
Add EAP-TLS, EAP-PEAP-MSCHAPv2, EAP-PEAP-GTC, EAP-TTLS-MSCHAPv2,
EAP-PEAP-TLS, EAP-TLS-SHA256 enterprise wpa2 and wpa3 suiteb
support for station.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
This allows to run the test 'chan_blen_transfer' and 'loop_transfer' on
the sgrm board.
The functionality tested in `chan_link_transfer` and `scatter_gather` is
not (yet) supported by the Si32 DMA driver, and those tests therefore
not enabled.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Adding myself as maintainer because my employer Husqvarna wants to
upstream the Gardena smart gateway radio module SoM to Zephyr, and keep
it well-supported.
Adding as collaborator M1cha, because he did the initial port.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This adds support for the SiM3U/Si4467 based SoM used on the GARDENA
smart Gateway [1] (art. no 19000 and 19005).
[1] https://github.com/husqvarnagroup/smart-garden-gateway-public
Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
Add updates to support MCXW71
Add support if RX data are received in ISR context
Add support to set BT address using Vendor command
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
If AP indicates the presence of buffered traffic, then it is up to the
STA to decide whether to stay in PS or come out of PS, add configuration
options that can be used at runtime to choose this.
This is tagged as "noup" because it's a backport and "fromlist" cannot
be used as it won't apply cleanly.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
The mutex is used to protect RPU zephyr context which gets modified for
every interface down and up (including recovery), so, it was being
re-initialized but also used to protect down and up which is a bug.
Move the re-initialization to the driver entry so that it happens only
once and we can properly use the mutext for down and up protection.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The RPU context lock is not unlocked this is causing recovery to be
stuck waiting for the lock.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
There is a race condition when recovery is in progress and in parallel
Wi-Fi util commands are being executed (CTF), where the RPU context is
de-initialized as part of recovery but no checks are present in the
Wi-Fi util command processing causing a crash.
This needs a proper fix for all commands, but for maintenance branch
fix is added only for commonly used commands.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Dynamically set power save exit strategy runtime configuration that
allows to switch b/w stratgies depending on conserving power and
low-latency traffic download.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Ideally we should be using Zephyr spinlock APIs but that requires
changes to shim API, so, for this maintenance release just replace with
mutex to keep the context same and no API changes.
This solves the locking issue that we see when control and data path are
excited concurrently due to locking semantics of semaphores, the issue
is not root caused but mutex enforce strict locking semantics for
multiple threads and solve the issue.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add a null check for HAL context in the interrupt handler, this was
causing locking issue operating on null. The root cause of null is not
known, but this solves the locking issue when data and control paths are
excited in parallel.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
To handle interoperability issue with few APs, add a feature to keep
sending keepalive frames periodically to avoid AP disconnecting the STA.
This is disabled by default to avoid unnecessary power consumption as
it's only seen with few old APs.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In crowded environments RPU is active for more than 10s due to too many
retries and this triggers a false RPU recovery. To avoid this, increase
the default to 50s to handle corner cases, as this will only impact the
recovery triggered case, higher timeout doesn't have any impact in
normal cases.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
With this offload, host doesn't need to manage RX buffers for management
frames, and this saves Host-RPU comms and thus giving RPU to sleep more
often and is essential to test RPU recovery.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These are very frequent, so, a separate debug is added for debugging
host RPU recovery logic.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
During interface down in case TX has pending buffers in either TXQ or
Pending_Q then they are not freed instead the Q itself is freed.
Fix by traversing the Q and freeing all members.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>