Since the RA2L1 uses the macro "ICU_EVENT" instead of
"ELC_EVENT" (which is currently used) to input into
the IELSR register, the ek_ra2l1 board cannot assign
any interrupts for any driver.
This commit aim to correct the Event macro to input correct
value for IELSR register on all the Renesas SoC by using
"BSP_PRV_IELS_ENUM" macro.
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
The day alarm was not being set correctly. The day alarm should be set
using the WADA bit in the control register. This patch fixes the issue
by setting the WADA bit in the control register when setting the day alarm.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
Add logging of the values that cause LOG_ERR statements.
This makes it easier to debug any issues that occur.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Reintroduce the fast path that skips reconfiguring if we use the same
configuration, this fixes regression that causes a lot of latency at the
start of repeated transfers. Unfortuantely need to find alternative
workaround for S32K3 in order to do this instead of module reset, so
disable skipping for that platform.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
On some platforms, the module is not getting clocked until call to
LPSPI_MasterInit, this will be fixed soon with upcoming update to native
driver and will clock the module in driver init instead of start of
transfer, but for now, move this code within the condition check that
already exists for this purpose.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The drivers still use the USBREG HAL driver which enables/disables the
interrupt by itself.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This driver was deprecated and must be removed by Zephyr version
4.1 according to lifecycle/release guidelines.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This config was missed when converting from eth_mcux to nxp_enet driver,
re-add it and use new one instead of old one.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Adding k_usleep while polling the flash's busy status yields the CPU
resource, giving lower-priority threads the opportunity to run.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Personally I found this file hard to understand at first,
but since now it is clear to me, I decided to put these comments
with my understanding to help anyone else who needs to use these.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This fixes failures seen with the SPI loopback test.
The fix waits for the TX and RX side to be complete
i.e when RX SHIFTBUF has been loaded from the RX Shifter
and the TX SHIFTBUF has transferred to the TX Shifter.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
I mistakenly assumed in the commit 6aaad0a5cd
("drivers: udc_stm32: handle ZLP flag") that the HAL driver would handle
ZLP flag in control transfers itself, but that does not seem to be the
case.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The RT1715 does not support TCPC_ALERT_EXTENDED_STATUS and
TCPC_ALERT_EXTENDED. This commit removes the related interrupt handling.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
The original i2c_transfer setup was complex and contained an incorrect
message count. Replace i2c_transfer with i2c_burst_read.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
As the previous version of the MCXW71 BLE Controller wasn't sending a
command complete event after setting the BD address, we used a
workaround to directly send the HCI command without using zephyr's API.
Now, on the latest version of MCXW72 and MCXW71, this issue is fixed,
so we need to use `bt_hci_cmd_send_sync` to properly expect the
command complete event.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
default watchdog initialization disable counting in EM1, EM2 and EM3
modes. If user use the WDT_OPT_PAUSE_IN_SLEEP flag via the watchdog api,
all 3 EM modes must take this flag into account to avoid wdt count
being frozen if we don't want to.
Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
If the to-host data stage length is less than that requested by the
host, but equal to or a multiple of MPS, the device should send a ZLP,
not receive it.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
When allocation fails in `hci_rx_cb`, we should return immediately
instead of continuing the execution of the function.
Also, we need to free the allocated buffer from the heap when sending
to the message queue fails to avoid memory leak.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Fix flash read operation to account for all unaligned
scenarios, i.e, address, buffer and length. This is needed
when using flash APIs provided in ROM.
This also removes the unaligned flash write call as it
expects aligned values only.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The SiWx917 BLE controller currently does not support
HCI Command 0x0C35 i.e. Host Number of Completed Packets Command
Disabling the ACL Flow Control avoids sending this command during
SMP Pairing process and therefore avoiding an ASSERT
Signed-off-by: Ramana Gudipudi <ragudipu@silabs.com>
Previously, 'USART_WCH_IRQ_HANDLER' used 'DT_INST_IRQ(index, priority)',
which incorrectly referenced 'index' instead of 'idx'. This issue went
undetected because 'IRQ_CONNECT' drops the priority value on all boards
supported by this driver.
Fix by using 'DT_INST_IRQ(idx, priority)'.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Send STOP or RESTART after a message only if they are enabled in message
flags. For reads, however, controller sends a NACK after last byte so a
restart is required even if I2C_MSG_RESTART flag is not set.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Ensure the corresponding bus enables RTIO (I2C, I3C or SPI) before
instantiating rtio-dependent elements. Otherwise, enabling it for
another bus (e.g: SPI_RTIO when the LSM6DS is also on I3C with no
I3C_RTIO) will cause a build-time failure.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
udc_skeleton incorrectly logs "Enable device" in the function
"udc_skeleton_disable", and some UDC drivers inherited this mistake.
Fix this by correcting the log message in all affected drivers.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Add a check for interrupt configuration: if the interrupt line for the
pin is already enabled but for the same port that the user asked, it
should not return EBUSY.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The scd4x_channel_get function converts raw word values to
struct sensor_value's per the datasheet. The calculation for val2 of a
struct sensor_value `val->val2 = ((tmp_val % 0xFFFF) * 1000000) / 0xFFFF;`
can overflow the max of int32_t, resulting in an incorrect
sensor_value.
Fix it by changing the type of tmp_val to int64_t.
Signed-off-by: Zach Thomas <zach.thomas1.zt@gmail.com>
These two sensors do not build with asserts enabled as they're
referencing a non-existent variable `pkt_size`.
Replaced for what (AFAIK) is the intended variable.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
There are two bugs that caused regression for S32:
First there is a silicon errata specifically for the mask version on
this board that causes FIFO flush to not work as expected. The
workaround is to do a module reset before each transfer.
Second there was a division error for word size > 1 byte. The division
should be rounded up, not down, otherwise there will be an infinite
interrupt loop because the TX fifo will not be written to but the TDR
interrupt enabled causes interrupt when TX fifo is empty.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
These two fields were not being used and were a relic of some
intermediate implementation, and forgot to be removed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The Kconfig description is wrong, this driver can be used with or
without RTIO. Also, rename the kconfig to be less confusing, as _NORMAL
is meaningless, this is the CPU/interrupt based driver.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Change the driver behavior so that if the provided RX buffer set is
bigger than the TX buffer, we will read all the RX buffer and fill the
TX with NOPs. The SPI driver API does not say to do this, and my
original interpretation of the API was that the TX length controls the
entire transfer length, but this behavior might fit better with some de
facto expectations of in tree consumers.
Also add some robustness to the calculation of how many extra bytes to fill
when tx should be nops.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This patch fixes transaction op items not performed within a single
SPI transfer. This is common for Write + Read commands, that depend on
the CS kept asserted until the end, otherwise the context will be lost.
A similar fix was applied to i2c_rtio_default on #79890.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The logic for setting the src_inc and dst_inc would improperly set
these to zero when gatter/scatter was enabled but the respective
gatther_interval/scatter_interval was zero (which would imply
continuous operation).
Fixes: #85403
Signed-off-by: David Leach <david.leach@nxp.com>
-Prefixed Zephyr driver functions with 'siwx917_dma' for consistency
-Added 'siwx917_' prefix to local functions
-Removed inline declaration for param validation functions
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>