At the present time, Zephyr does has overlap between sleeping and
suspending. Not only should sleeping and suspended be orthogonal
states, but we should ensure users always employ the correct API.
For example, to wake a sleeping thread, k_wakeup() should be used,
and to resume a suspended thread, k_thread_resume() should be used.
However, at the present time k_thread_resume() can be used on a
thread that called k_sleep(K_FOREVER). Sleeping should have nothing
to do with suspension.
This commit introduces the new _THREAD_SLEEPING thread state along
with some prep-work to facilitate the decoupling of the sleeping and
suspended thread states.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
ADS131M02 is Texas Instruments 2-channel, 24-Bit differential
input ADC which support wide range datarate.
Driver add support for adc read, channel configure, adc sampling
mode configuration and power management.
[1]. https://www.ti.com/lit/ds/symlink/ads131m02.pdf
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Shield was enabling some Kconfig options for no reason. Shields do
not need to enable driver classes unconditionally, these are enabled
either by drivers or samples that require them.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new option to control usage of DT nodelabel board_power. This
option also allows to select GPIO when needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add options to control the behavior of sw0/sw1. These options also allow
to select GPIO when needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new option to control the behavior of sw0. This option also allows
to select GPIO when needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new option to control led0 behavior. If enabled, led0 will be used
for blinking. This option also allows to select GPIO when needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new Kconfig option to control the behavior of sw0. If enabled, sw0
button will be used for provisioning. This option also allows to select
GPIO.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new Kconfig option to control the behavior of led0. This option
also allows to select GPIO only when needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add additional test cases which verify that the HTTP server code can
handle PUT/PATCH/DELETE request types.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Extend the list of methods supported by dynamic resources with
PUT/PATCH/DELETE. The methods does not require any extra handling
from the server perspective, so the existing method handlers could be
reused.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
config->base is already defined as ADC_TypeDef so no there is no need to
cast it as such. Remove all occurrences throughout the file.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that clock source and sequencer are defined with strings in device
tree, move the old defines directly in the driver
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that st,adc-sequencer and st,adc_clock-source use a string, update the
ADC driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
fu drv adc update driver with string
In all STM32 dtsi and board dts, update the st,adc-sequencer and the
st,adc-clock-source properties so they are strings.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
fu dts: arm: st: use string instead of enum
STM32 sequencer property and clock source were defined using
arbitrary numbers. Use string instead.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Adds an ADC DMA test for Nucleo F103RB board now that support for it is
added in the ADC driver.
Reading multiple channels in F1 is only possible with the DMA, hence the
necessity to have a dedicated twister test for it.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove specific cases for H7 and U5: group them together and only call a
single function. ADC3 of H72x/H73x and ADC4 of U5 are different from other
ADC of their series, and have dedicated functions in the LL for enabling
DMA, but they're doing the exact same operation as
LL_ADC_REG_SetDataTransferMode.
Incidentally, this change allows H7A/H7B to use the DMA (it seems to have
been missed before).
Last, this change enables the DMA support for F1x ADC.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
On STM32 ADC, there are currently two types of oversamplers (if present),
one with 8 available oversampling values, the other with 1024.
To simplify the driver, add the oversampler as a dts property.
Also add defines to avoid magic values in the dtsi.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
STM32F3 and H7 have multiple ADC versions difficult to differentiate.
Use clearer macros to make code more readable.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Reverts a change regarding how the test checks the pulse output
from a capture event. A pulse capture will produce a value that has
the same polarity (and range) as programmed by pwm_capture().
Checking 'pulse_capture' against 'period - pulse' means expecting
the driver to return a capture value that is not inverted as well,
which would cause test cases to fail.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Use shell_device_get_binding() instead of device_get_binding() so that
we get the device based on its name and in addition by its label.
Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
Mode 0 cannot establish a connection when used as a UDP server,
replace mode 0 with mode 2 to save the client's IP and port as
the communication address when a message is received.
Fixes#82898
Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
Update Zephyr fork of MCUboot to revision:
f5454f16358225f69ff729301c8e56d8a580f81a
Brings following Zephyr relevant fixes:
- f5454f16 boot: bootutil: loader.c: Add check if has upgrade
before pushing state change
- 0946c7a7 boot: zephyr: boards: add ctcc/nrf52840 and
ctcc/nrf9161 targets
- 7ba0e552 boot: zephyr: nxp: Add NXP platforms to the allow
list
- 4f393563 bootutil: Fix device brick after power failure
during swap-move revert
- 2ac79767 bootutil: Fix the reading of image headers after
partial swap completion
- 84416fd2 boot: zephyr: boards: Add frdm-mcxa156 configuration
- 15909d60 scripts: imgtool: fix sha512 for compression
- f2a61462 boot: zephyr: boot_record: Save boot data with
single image
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add the option for a unique numeric identifiers to be attached to a
zbus channel. This identifier can then be used to lookup the channel
structure at runtime. This is useful in two situations (that I can
immediately think of).
Firstly for external interaction, i.e a text shell or remote procedure
calls. The current state of a channel can be queried by an ID that never
changes, as opposed to the external entity needing to know the exact
memory address of the channel for a given application binary.
Secondly for integrating with dynamically loaded extensions (llext).
These extensions can hook into the existing data streams without each
individual channel needing to be exported and visible to the loader.
Signed-off-by: Jordan Yates <jordan@embeint.com>
- Add "channel-available-mask" property in ADC node
to detect which channels are available to use
- Add "add-average-count" property in ADC node to chose
number of count of the addition or average mode
- Change the source code of ADC to match with 2 new properties.
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
The real, applicable and trusted values are the ones flashed into BICR.
So, drop DT properties that replicate BICR and use runtime reads to BICR
instead.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The real, applicable and trusted values are the ones flashed into BICR.
So, drop DT properties that replicate BICR and use runtime reads to BICR
instead.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The real, applicable and trusted values are the ones flashed into BICR.
So, drop DT properties that replicate BICR and use runtime reads to BICR
instead.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
BICR (Board Information Configuration Registers) are located within the
application UICR region (ref. MRAM mapping, table 38).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The consequences of a wSequence mismatch are unspecified and are
primarily for debugging purposes. Our checks are a bit too strict, and
if the header check fails, the sequence is not updated, and the header
check subsequently fails. Rework the code to just log a warning on
mismatch and also reset OUT sequence counter the same way as the IN
sequence counter.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>