The macros placing the DMA memory buffer in the appropriate
section in RAM was malformed. This PR fixes it.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Many drivers use a wrong __ASSERT in the fetch API, where they just
use SENSOR_CHAN_ALL, while it is more common fetching the specific
sensor channel (i.e. SENSOR_CHAN_PRESS, SENSOR_CHAN_ACCEL_XYZ, ...).
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The Openthread communication with RCP via UART (with HDLC protocol) is
performed with serial driver using interrupts. As it was tested with
echo_client sample program, the
CONFIG_SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN is defined by default for
it. This config selects aforementioned UART_INTERRUPT_DRIVEN.
Problem starts when somebody wants to integrated the driver as a standalone
one (without echo_client) as a part of user application.
In this situation the UART_INTERRUPT_DRIVEN is not defined by default and
there is no serial communication between RCP and HOST devices.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The Atmel sam4l have generic clock 5 enabled at 1024Hz. Update sam4l
sam_tc_input_freq_table index 0 to reflect right value.
signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Update the nrf70 Wi-Fi driver to use the mode specific
APIs (as a precursor to enable combining modes as required).
Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
The transfers require enpoint MPS for proper transaction handling,
assign it in the common place during transfer allsocation so that it can
be reused.
Some users, such as USBIP, may need to keep a reference to private data,
add a parameter for completion callback data.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add an opaque pointer to store upper layer private data and initialize
it with the USB host context during controller initialization. Use the
pointer in event processing to get the correct context.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add interrupt and start frame parameters and schedule transaction at
specific frame. Implement for virtual driver only.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Address parameter/argument is no longer needed because we have a pointer
to the USB device. The Attrib parameter has never been used and will be
replaced by the interval and start-frame parameters in the future.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
With the current implementation, NACK claims all resources and prevents
scheduling multiple transfers within a frame. Place a number of
available transfers in a list at the beginning of a frame, and process
the transfers in a limited number of slots.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Implement the dequeue function and remove the timeout parameter as it is
no longer necessary and can be handled in the upper layer. The dequeue
function is required for the USBIP implementation.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not necessarily call k_timer_init() in the uhc_bus_resume()
implementation. Restart SOF timer after bus reset and in
uhc_sof_enable() implementation.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add WPA2-PSK-SHA256 security type support for embedded supplicant.
Convert wifi key_mgmt to zephyr security type.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Added a build assert to limit num_pins to a maximum allowable value to
prevent potential out-of-bounds access or infinite loops.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Introduce new DAI driver used for NXP's PDM MICFIL IP.
This block implements required digital interface to provide
a 24-bits audio signal from a PDM microphone bitstream in a configurable
output sampling rate.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
To support icm42370-p sensor, we renamed icm42670 to icm42x70
as the driver is similar to ICM-42670-P/S in hal_tdk module.
Keep icm42670 source and header for dedicated code.
Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
The PCA6416A is a 16-bit general purpose I/O expander that provides
remote I/O expansion for most microcontroller families via the I2C-bus
interface.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
1. The sys_clock_idle_exit function could be invoked multiple
times. Hence add code so that is counter is stopped and the
OS Timer is initialized once.
2. Reset the OS Timer when exiting low power modes where
the OS Timer loses its state
3. Improve the cycles conversion algorithm. Round to the nearest
microsecond when converting from ticks to microsecond rather
than always rounding up to the next highest value.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
In Completer mode SETUP data can always be received and therefore
endpoint 0 should only be enabled for OUT Data Stage and OUT Status
Stage.
In Buffer DMA mode, SETUP can only be received when endpoint is enabled
and therefore the software has to make sure that there is a buffer
available to receive SETUP data.
Rework the EP0 buffer feeding to adhere to DWC2 Programming Guide.
Synchronize the accesses with driver mutex to avoid interrupt related
race conditions.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The transfer is finished after ZLP is transmitted. Do not re-enable the
endpoint waiting for more data.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Control OUT buffers must be multiple of bMaxPacketSize0 in Buffer DMA
mode. While the transfer can be configured to smaller values, DMA will
write data past the buffer (and transfer size counter will underflow) if
the packet on the bus is larger or if there are multiple back-to-back
SETUP packets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Use helper functions to check whether device is operating in Buffer DMA
or Completer mode. This allows compile time optimizations to remove DMA
handling code when DMA is disabled via KConfig symbol UDC_DWC2_DMA.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
clean up usage of usage "#ifdef STM32_SRC_SYSCLK"
and code under the "#else" from clock_stm32_ll_common.c.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
This fixes DNS resolve failure (CONFIG_DNS_RESOLVER) by enabling
CONFIG_WIFI_ESP_AT_CIPDINFO_USE (AT+CIPDINFO) automatically to get
peer ip-address and port, required by CONFIG_DNS_RESOLVER.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Add properties to differentiate the timer counter operating modes. This
properties are necessary to spetialize the driver to be used as a normal
16/32-bit counter or to provide the clock/calendar functions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Coverity identified out-of-bounds access. A uint8_t being cast to
an enum is undefined in that the enum can be allocated 4bytes.
Change the internal function to use the base type of the variable,
uint8_t to avoid potential compiler size alignement problems.
Fixes#81927
Signed-off-by: David Leach <david.leach@nxp.com>
When building with clang it warns:
drivers/mfd/mfd_adp5585.c:59:6: error: variable 'reg_int_status' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (ret == 0) {
^~~~~~~~
drivers/mfd/mfd_adp5585.c:70:7: note: uninitialized use occurs here
if ((reg_int_status & ADP5585_INT_GPI)
^~~~~~~~~~~~~~ && device_is_ready(data->child.gpio_dev)) {
drivers/mfd/mfd_adp5585.c:59:2: note: remove the 'if' if its condition
is always true
if (ret == 0) {
^~~~~~~~~~~~~~
drivers/mfd/mfd_adp5585.c:54:24: note: initialize the variable
'reg_int_status' to silence this warning
uint8_t reg_int_status;
^
= '\0'
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
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: Johann Fischer <johann.fischer@nordicsemi.no>
XIP may indicate that the program is executed either in local memory
or flash. However, the SPI node is only used as a flash fetch device
when the program is executed in flash.
Therefore, optimize the related checks to ensure that when XIP is
enabled but the program is executed in local memory, the qspi flash
node can still be used.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
ATCSPI hardware limits single transfer to 512 bytes, so when reading
data over 512 bytes, it needs to be split into multiple transfers
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
Move the memory barrier to a function that commits option bytes.
This way the barrier doesn't have to be added before every call of the
commit_optb function.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Change the return value of the write_opt function. If returns 0 if a
change of option bytes was not needed.
It gives callers of the function an information a commit of the option
bytes is needed.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Some stm32f4, like the sm32f411 mcu have clk 48M on the main PLL output q
Some stm32f4, like the sm32f412 mcu have clk 48M on the PLL I2S output q
This PR is for selecting the right one
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The erase time varies between different SPI NOR flash chips.
Some have typical erase times in the 20-25ms range, at which point the
default 50ms poll interval means we get half the possible erase speed.
With slower memory, or larger erases, 50ms might not be a lot, but for
block erases, if we are unlucky we may end up polling just as the it's
about to finish erasing, and have to wait another poll interval.
Signed-off-by: Kamil Krzyzanowski <kamnxt@kamnxt.com>
Add wsen_pads_2511020213301 driver with
the corrected name and compatibility with
the hal update as well as added new features.
Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
Previously, the Kconfig option CONFIG_STMEMSC_I3C_I2C_WRITE_BUFFER_SIZE
has been introduced to replace i2c_burst_write with i2c_write using a
buffer combining the address and data.
See commit 5f8da77ad3eaf0593107fd99253c1c13b3a98de0
Add missing buffer size config to stmemsc_i2c_write_incr to replace
fixed buffer size.
Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
Fix a runtime bug when both CONFIG_LIS3MDL_TRIGGER and CONFIG_ASSERT
are set. The correct assertion should verify that sensor channel is
either SENSOR_CHAN_ALL or SENSOR_CHAN_MAGN_XYZ.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The TSL2591 driver fails to initialize because the sensor responds with a
NACK on the initial RESET. Although the datasheet from Adafruit claims that
this is operation should be valid (RESET is part of the CONTROL register),
other sample non-Zephyr drivers provided by Arduino don't explicitly reset
the sensor on initialization (see
https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/Adafruit_TSL2591.cpp).
Thus, the assumption is that when the sensor is reset via software, it
doesn't respond to an ACK.
After removing the check for this initial RESET, the driver initializes
successfully.
Signed-off-by: Mohammed Billoo <mab@mab-labs.com>
Remove ESP heap from the sources. System heap is default heap.
Use heap adapter layer to configure used heap.
Use MEM_POOL memory request config to Wi-Fi and Bluetooth drivers.
Update the Wi-Fi and BLE memory needs.
Signed-off-by: Marek Matej <marek.matej@espressif.com>