The previous 1ms sleep introduced unnecessary latency
while waiting for the SUSPF flag.
Switching to a 750µs busy-wait provides a more responsive
and precise delay,improving performance in time-sensitive contexts.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Clear the suspended status and submit the resume event once the remote
wakeup signaling is finished. Clear the suspended status on bus reset as
well.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
RP2350 features a glitch detector which can be treated as a security
mitigation, and more ways debug adapters can reset CPUs, add those
as well.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
some platforms dont have these doze related symbols defined, and causes
a build error, fix with #ifdef bandaid.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Split the RX buffer into multiple sub-buffers aligned to DCACHE boundaries
to ensure proper operation during DMA transceive.
Signed-off-by: jacob kung <jacob.kung@egistec.com>
The Egis ET171 SPI controller was based on Andes ATCSPI200,
but has since been modified. In particular, the WrTranCnt and RdTranCnt
fields from the SPI Transfer Control Register have been moved to dedicated
Wr_Tran_Cnt and Rd_Tran_Cnt registers.
Signed-off-by: jacob kung <jacob.kung@egistec.com>
Allows the SDL display to be tinted in a specific color,
to allow the simulation of monochrome colored displays
like `R8` (`L8` + tint `0xff0000`)
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Run clang-format on tmp11x.c and tmp11x.h and change `DEFINE_TMP11X` to
prevent too long lines when clang-format is run.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Enable optional storage of sensor attribute values in EEPROM. On reset, the
device goes through a POR sequence that loads the values programmed in the
EEPROM into the respective register map locations.
The driver stores sample frequency, offset, oversampling, lower threshold,
upper threshold, alert pin polarity, alert mode and conversion mode if the
value is continuous or shutdown.
The functionality has been tested with sensor shell and power cycling
sensor:
Test (undocumented) temperature offset is stored:
```shell
uart:~$ sensor attr_set ti_tmp11x@48 ambient_temp offset 0
ti_tmp11x@48 channel=ambient_temp, attr=offset set to value=0
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (25.523436)
uart:~$ sensor attr_set ti_tmp11x@48 ambient_temp offset 50
ti_tmp11x@48 channel=ambient_temp, attr=offset set to value=50
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.617186)
uart:~$
[15:12:20.088] Disconnected
[15:12:36.106] Connected
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.554686)
uart:~$ sensor attr_get ti_tmp11x@48 ambient_temp offset
ti_tmp11x@48(channel=ambient_temp, attr=offset) value=50.000000
```
Test one-shot mode is not stored:
```shell
uart:~$ sensor attr_set ti_tmp11x@48 ambient_temp 18 1
ti_tmp11x@48 channel=ambient_temp, attr=accel_x set to value=1
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.562499)
uart:~$ sensor get ti_tmp11x@48 ambient_temp
Read failed
[00:00:21.332,000] <wrn> sensor_compat: Failed to fetch samples
uart:~$
[15:16:24.529] Disconnected
[15:16:33.540] Connected
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.406249)
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.351561)
```
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add PWM driver support for Renesas RZ/A3UL
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Remove these legacy kconfig, not necessary.
The DT already has the bindings and nodes required to represent if there
is a FlexSPI and/or SEMC.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This Kconfig does not belong in the ADC folder, because there is not
actually a zephyr ADC driver for this. Also, remove HAS_MCUX_ADC_ETC as
well because it is a useless config.
The cmake line to pull in this driver from the SDK in the zephyr repo is
totally unnecessary. If a user wants to use this SDK driver they can add
it to their build like any other SDK driver or any other
external code module. Zephyr should not be a cesspool of random build
glue for random pieces of code.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove the configs that are not actually used for anything anymore or
never were, or that are redundant with other configs, and don't have any
code changes outside of Kconfig to remove.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Clear color for ARGB8888 was set to opaque white, which is an odd
choice.
This change makes the clear color "transparent".
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
There was actually three different types of configuration modes
happening here, and this function was getting extremely bulky and hard
to read due to the amount of nesting of conditionals. Split these into
separate functions and call them appropriately depending on the type of
transfer.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There is two completely different types of reload modes happening here,
therefore we should split this function into two completely separate
functions because it was getting large and hard to read. Removes
one level of indentation.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Instead of having preprocessor code, make a hidden kconfig
to indicate this and be smarter about the C code (these are all powers
of two)
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The dependency on the chosen node for dtcm can be expressed in Kconfig
language.
Cache we care about is CPU DCACHE, not the meaningless "MCUX Cache"
The macros can be reordered to be simpler by having only one level of
conditional (no nesting) instead of three levels.
Move this code closer in the file to where this cache attribute macro is
actually going to be used (the init macro) instead of randomly splitting
up the struct definitions at the top.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Use a mutex to protect the I2C bus from concurrent access. Replace busy
waiting with a binary semaphore. Process the messages in the interrupt
handler state machine to generate a single transaction. In the
interrupt handler, process the states until nothing more is to do. This
prevents superfluous interrupt entry/exit pairs. Return error
conditions to the caller. Check the messages for consistency and return
an error for unsupported message lists.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Changed to use the raw reading rather than the scaled value, as that's
what the angle calculation is expecting. Added log messages that
communicate magnet sense state.
Signed-off-by: Russ Webber <russ@sentryrobotics.au>
Set the point-to-point flag because PPP is a point-to-point protocol. This
flag enables specific IPv6 neighbor discovery handling, to select the
correct sending interface. Without it set, a different interface might be
selected based on the destination address.
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
Fix compiler errors about variables potentially being used uninitialized.
These are false positives, as the compiler is confused by the
K_SPINLOCK() macro. Explicit initialization avoids these errors.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
This is temporary fix for SAADC power consumption. Need to be
removed after hal_nrfx version upgrade.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
This commit introduces a new devicetree property, bits-per-symbol, to
allow the symbol width to be configured from 3 to 8 bits. This change
is particularly beneficial for MCUs that lack DMA for their SPI
peripheral and have a limited hardware FIFO.
This property provides flexibility by allowing developers to select a
slower SPI clock frequency and use the symbol width to scale the
timings to meet strict LED strip requirements, minimizing the risk of
FIFO underruns.
Additionally, using higher-density patterns (e.g., 3-bit or 4-bit
symbols) makes more efficient use of the pixel buffer, which reduces
the RAM footprint required for the LED strip data.
The implementation is optimized with a fast path for the common 8-bit
symbol case, while a generic bit-packing loop handles all other
widths.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Use the device in register accesses. This allows to use this code with
multiple controllers instead of only the "chosen" one.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
This reverts commit 01ab719ed7938481b459ed5df122f935aa6ae3e0.
This is no longer needed, as we now have a scalable solution
using a vendor-specific resource table, which allows each vendor
to define its own supported features.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>