Fix mcux flexcan driver failed to transfer when both loop back mode
and CAN FD mode are enabled.
Transceiver Delay Compensation feature must be disabled in loopback
mode. For some platforms, both FDCTRL[TDCEN] and ETDC[ETDCEN] can
enable such feature. In this case, SDK API only configure ETDC register
and current driver do not clear ETDC[ETDCEN].
Fix this issue by add ETDC[ETDCEN] configuration according to SDK
macro `FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG` vaule.
Test this commit on mimxrt1180_evk/mimxrt1189/cm33 and set both CAN FD
mode and loop back mode.
Signed-off-by: William Tang <william.tang@nxp.com>
Change HDC_302X_TEMP_OFFSET_SCALE and HDC_302X_HUMIDITY_OFFSET_SCALE
from float literals to double literals to avoid implicit conversion
warnings when compiling with clang and -Wdouble-promotion flag.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Redefine some macros due to different naming scheme in the header file.
Get the clock rate from the device tree when 'SOC_ATMEL_SAM_MCK_FREQ_HZ'
is not defined.
Signed-off-by: Tony Han <tony.han@microchip.com>
The HDC302X sensor driver is added,
you can use this driver to read temperature and humidity.
Also set an offset, upper and lower limits to get warned
when temperature or humidity get out of band.
The sensor is build for ultra low power applications.
Signed-off-by: COUSSEMENT Stijn <stijn.coussement@psicontrol.com>
Reduce floating-point operations in the nxp_pmc_tmpsns.
Provide new calculation method without floating-point operations.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The max30101 allows to configure time slots in samples acquisition.
It is now supported by adding matrix mapping for the slot/fifo
indexing. When a channel is present multiple times, the resulting
sample from the `sensor_channel_get` is averaging each entry.
Added Die temperature sample acquisition with
`CONFIG_MAX30101_DIS_TEMPERATURE` Kconfig.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
The max30101 sensor driver doesn't support triggers.
Add `.trigger_set` API and corresponding Kconfig and
device tree parameters. Add `SENSOR_CHAN_AMBIENT_LIGHT`
and `SENSOR_TRIG_OVERFLOW`.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
The max30101 sensor driver doesn't support multiple instance.
Update Kconfig and maxim,max30101.yaml for instance based
configuration. Propagate changes over existing files.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
Enable this kconfig setting to force using a specific raw value for the
OVRDVAL field in the DLLCR registers.
This option gives more granularity than the 'data-valid-time' field in
the dts. The unit of 'data-valid-time' is nanoseconds while the unit of
OVRDVAL are raw delay cells.
Normally the 'data-valid-time' on any 'nxp,imx-flexspi-device' device
will set the OVRDVAL and OVRDEN fields in the DLLCR register
but works only when the 'rx-clock-source' is configured to '#0 External
input from DQS pad' and the frequency <= 100MHz.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Replace the look-up table used to obtain the prescaler enumeration with
a simple multiplication.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The existing formula assumed prescaler enumerations were consecutive,
which led to incorrect values being passed to HAL functions. Update
the code to calculate correct prescaler enumerations.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
In case of using HAL_OVERRIDE, avoid clearing the FIFO ERROR flag
before calling the HAL DMA IrqHandler so that the HAL DMA code
handling can be used.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
If hal_override is set, avoid reporting an error and clear the
transfer error (TE) bit so that HAL code can properly handle it.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The size of icm45686_encoded_data fifo_payload is guaranteed
to span the full number of frames read as it was allocated during
icm45686_event_handler() buf_len_required size.
This update suppresses the static analysis warning of
out of bounds memory access at index 1 by explicitly declaring
fifo_payload to be a VLA at the end of icm45686_encoded_data.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Change the __ASSERT on unsupported fifo packet header to
CHECKIF so the user can choose how to handle the invalid
packet.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
When operating in streaming mode, a FIFO empty event, which
is caused by host reading the last byte of the last FIFO frame,
can cause FIFO data corruption.
During subsequent reads to the FIFO, the first frame that arrives
after the empty condition will be corrupted. Once the issue occurs,
the internal state cannot recover and the FIFO must be flushed in
bypass mode to clear the corrupted state.
The current workaround from TDK is to read M-1 frames when M frames
are reported by fifo_count. Since M is fixed by the fifo_watermark
DT parameter, and in cases where fifo_watermark == 1, the watermark
trigger threshold is set to M + 1 frames and M frames are read out
during a watermark threshold event.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
When an unsupported fifo packet triggers an assert, it is
helpful to see the packet as a hex value to help when debugging.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
tx_int_sem serves solely as a signal indicator and does not require signal
counting. Within eth_stm32_tx, the semaphore is reset each time a packet
is transmitted. Upon receiving the transmission completion signal, the
function exits. Signal counting is unnecessary. Change to a binary
semaphore.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
During a Host-to-Device Control transfer, an arbitrary amount of data is
sent from Host to the Device using OUT Data packets. If the total amount of
data to transfer, communicated via the wLength field of the SETUP packet,
exceeds the EP0 MaxPacketSize, several Data packets until all data has been
transfered.
Combined with HAL behavior, the STM32 driver did not handle this situation
properly and always ended reception after a single Data packet was received
regardless of whether or not all data had actually been received from Host.
Modify driver to handle this situation properly by keeping track of how
much data has been received and restarting transfers until we have received
everything the Host promised it would send.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Drop all existing transfers in control endpoints' queue when a new SETUP
packet is received. Also use the appropriate net_buf API in a nearby place.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Extend the IT51XXX M1K flash controller driver to implement the flash
extended operation (ex_op) API. This allows runtime selection of both
the flash device and the addressing mode:
Flash target selection:
- FLASH_IT51XXX_INTERNAL: on-chip SPI eFlash
- FLASH_IT51XXX_EXTERNAL_FSPI_CS0: external SPI flash on FSCE0#
- FLASH_IT51XXX_EXTERNAL_FSPI_CS1: external SPI flash on FSCE1#
Addressing mode selection:
- FLASH_IT51XXX_ADDR_3B: 3-byte (24-bit) addressing mode, supports
flash devices up to 16MB capacity
- FLASH_IT51XXX_ADDR_4B: 4-byte (32-bit) addressing mode, required
for devices larger than 16MB
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Rename the modulino pixels driver to use the official marketing name,
the "smartleds" one was picked incorrectly from the source code of the
on board mcu of the module itself, but that was clearly out of date.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Properly close down the CMUX channel before shutting down
the modem.
The CMUX Close-Down command should indicate the remote end
to clean up, even if we don't have shutdown script or power-key GPIO.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Optimizes i2s_esp32_stream_data and i2s_esp32_stream_conf structs and adds
property sanity check according to soc series based on SOC_GDMA_SUPPORTED
feature
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Allows to defer processing of an empty tx queue when tx_callback is
executed. This prevents error conditions if the tx dma interrupt is
generated too early, as occurs with esp32 and esp32s2.
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Reworks i2s_esp32_read() and i2s_esp32_write() to allow consistent use of
stream->data->state
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
A Kconfig options for the SiSDK Protocol Crypto library, which provides
accelerated cryptographic primitives using the RADIOAES peripherals for
Series-2 devices.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
On several boards, such as the Arduino Giga and
Portenta H7, they are often times setup with their
camera buffers and potentially video buffers in
SDRam. This can lead to a significant number of
DMA errors, which currently stops the camera from
returning any additional frames.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Forward the get_selection and set_selection APIs
to the camera objects, to allow some of the
selections to be supported at the camera level.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Implements the set_selection and get_selection APIs,
if forwarded to it by a camera controller.
It uses the new messages
to allow you to set a crop window on top of the
current format window. It also then allows you
to move this crop window around in the frame
window.
With this driver I also updated it to allow any resolution
from the displays min to max limits.
static const struct video_format_cap fmts[] = {
GC2145_VIDEO_FORMAT_CAP_HL(128, 1600, 128, 1200,
VIDEO_PIX_FMT_RGB565),
GC2145_VIDEO_FORMAT_CAP_HL(128, 1600, 128, 1200,
VIDEO_PIX_FMT_YUYV),
When the resolution is set, it computes the scale factor.
Using the set_selection(VIDEO_SEL_TGT_CROP) allows you
define a crop window within the format window.
It clamps the ratio to a max of 3 as some other
drivers limit it saying it helps with frame rates.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Issue was that the gpio interrupt was happening before the work item was
initialized, and then trying to schedule it, resulting null pointer
dereference and fault occurring.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
These busy waits were only introduced during a debugging exercise and
not supposed to have made their way into mainline.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
In case of hardware controlled CS pins the SPI context must be
initialized after the clock and pin control have been initialized.
Otherwise, corresponding STM32 LL operations would access a SoC
functional unit that is not yet supplied with a clock and fail
silently without error handling.
Signed-off-by: Stephan Linz <linz@li-pro.net>