Some STM32 SPI have the ability to bypass the baudrate prescaler, which is
equivalent to having a prescaler of 1.
Adds this new value in the prescaler calculation if available.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The CHSC5X chip requires reads to be aligned to multiples of 4 bytes.
If the read length is not a multiple of 4, the device pulls SDA/SCL low
for about 140 ms. The IC_TYPE address is corrected to 0x80.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
drivers/crypto/crypto_mbedtls_shim.c:310:3: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
uint16_t tag_len = ctx->mode_params.ccm_info.tag_len;
^
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Explcitly zero the flags of the SQE obtained from `rtio_sqe_acquire`
when the `rtio_sqe_prep_*` helpers aren't used (the helpers memset the
entire struct to 0).
The flags must be reset to ensure the `RTIO_SQE_TRANSACTION` and
`RTIO_SQE_CHAINED` are not retained from a previous SQE.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Introduce steps to maintain cache coherence around DMA accesses to the
underlying SD / eMMC storage.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Remove the manual encoding of edata->header.channels and
edata->header.timestamp as these are now handled during rm3100_encode()
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Use rm3100_encode() to populate cycle_count info when
configured in streaming mode.
Previously when configured for streaming, cycle_count would
be 0 and rm3100_convert_raw_to_q31 would default to always
use the 600hz divider resulting in values off by a factor of 2.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
The scale factor when used as a divider from the datasheet specifies
units in LSB/uT not uT/LSB. This change corrects the comment to reflect
the correct units for the divider.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
unify msx-gpios for step-dir drivers. tmc2209 is an exception
for now and hence migrating to m0/m1-gpios instead of msx-gpios.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Add a Kconfig option to tweak the i2c shell command buffer size,
similarly to other shell commands.
This is allocated on the stack so add a note about it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Originally, function 'mcux_lptmr_get_pending_int' checks if both
TCF and TIE flags are set to determine if an interrupt is pending.
But function 'LPTMR_GetStatusFlags' only returns the status flags,
that is we will never get TIE flag from it. then the function
always returns false.
The correct approach is to read the CSR register directly and check
if both TIE and TCF bits are 1. If yes, there's a pending interrupt;
if not, there isn't.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
When CMUX channels are closed, UART goes back to AT command mode.
Switch Chat pipe to use the plain UART as DLCI2 pipe does not
exist anymore.
Add a small delay, so the remote end have time to clean up and
go back to normal AT command mode.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
In the `airoc_mgmt_connect` function, if the user provides a security
type of `WIFI_SECURITY_TYPE_NONE` along with a PSK, the driver attempts
to scan for the AP to determine the correct security protocol.
However, if this scan fails or does not find the AP, the driver would
previously fail the connection attempt instead of using the security
type originally provided by the user.
This change ensures that if the scan does not resolve the security
type (`WHD_SECURITY_UNKNOWN`), the driver falls back to using the
security type from the connection parameters. This makes the connection
process more robust and resilient to scan failures.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Add the support of the IWDG early wakeup.
Gives the possibility for the user to set a
callback that will be called before an IWDG reset.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Added a MAC-layer filter to discard frames whose source MAC address
matches the devices own MAC address. These packets are looped-back
frames that do not need to be processed again by the network stack.
Dropping such frames early improves correctness, avoids redundant RX
processing, and reduces load on the IPv4/IPv6 protocol handlers.
This patch is a workaround for a bug in the NWP
Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
The SAM4S pwm supports several events. This commit
implements the events when a channel period has ended
or a fault event has occured.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
Extend the PWM API to support events, as some
controllers allow interrupts if e.g., a pwm period
has ended or a fault occured.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
Macro added to compare the devicetree bindings against
values in the MDK to clean up code and check out-div
bindings.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Add device tree support for enabling the second low pass filter
(LPF2) for the accelerometer output.
This adds additional low pass on top of the default ODR/2 from
the LPF1 output.
Signed-off-by: Emil Hammarström <emil.a.hammarstrom@gmail.com>
Log level in failures were changed from DBG to ERR so that the reason of
initialization failure may be known.
Signed-off-by: Emil Hammarström <emil.a.hammarstrom@gmail.com>
Retrieve the desired tag length from the "struct cipher_ctx" being passed
to "cipher_begin_session()" when using CCM.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The `ll` part of driver's file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways. Addtionnally, the
presence of `ll` among STM32 drivers is not consistent.
Get rid of it for this class's driver to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of driver's file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways. Addtionnally, the
presence of `ll` among STM32 drivers is not consistent.
Get rid of it for this class's driver to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of drivers' file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways (per IP variant).
Addtionnally, the presence of `ll` among STM32 drivers is not consistent.
Get rid of it for drivers of this class to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of drivers' file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways (per IP variant).
Addtionnally, the presence of `ll` among STM32 drivers is not consistent.
Get rid of it for drivers of this class to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of driver's file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways. Addtionnally, the
presence of `ll` among STM32 drivers is not consistent.
Get rid of it for this class's driver to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use ring indicator to wake up the CMUX device
from sleep.
Only used for runtime power management, but same event
could be used for initiating idle -> connected as well.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Ringbuffer is not safe in ISR but k_pipe without waiting is.
So use pipe for events, so that possible GPIO callbacks from
ISR content can post events.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
CMUX driver can enable the support for idle-timer in
devicetree and can be requested to shut down the pipe
during sleep.
Then UART backend put the actual device into sleep when
pipe is closed.
Waking up is requested by sending data to DLC pipe
or by manually opening the uart_pipe.
Modem may request similar wake-up by a RING interrupt which
would open the same pipe.
When UART is powered and pipe is not closed, CMUX wake-up
procedure is automatic. Either end may initiate the wake-up.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add edac driver for NXP's ERM and EIM peripherals. It can inject ECC
error to specific channel within EIM and then report the error address,
syndrome and count within ERM.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Fixes broken 16-bit on STM32N6 series.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The range check should be inclusive: scale 4 allows *up to* 25 MHz, scale 3
*up to* 55 MHz, etc.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for the new `voltage-scale` property on the STM32U5-specific
Power Controller binding.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Instead of returning a converted ADC reading, return the
raw ADC sample. Conversion is left to the user based on
the selected ADC mode (single-ended or differential).
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
The Siwx91x ADC reference voltage is configurable rather than fixed.
Expose `ref_internal` in the device API so the driver can retrieve the
reference voltage from the device tree instead of assuming a constant
value.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Please note that when performing conversions,
the selected channels must all be of the same type
(either ADC raw or V2T.)
Mixing ADC and V2T channels in a single conversion sequence is
not supported.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>