Home
last modified time | relevance | path

Searched +full:calibration +full:- +full:voltage (Results 1 – 25 of 61) sorted by relevance

123

/Zephyr-latest/dts/bindings/sensor/
Dst,stm32-temp-cal-common.yaml2 # SPDX-License-Identifier: Apache-2.0
6 include: [base.yaml, "st,stm32-temp-common.yaml"]
9 ts-cal1-addr:
12 description: Address of TS_CAL1 calibration parameter
14 ts-cal1-temp:
19 ts-cal-vrefanalog:
23 Analog voltage reference (Vref+) voltage with which
24 temperature sensor calibration parameters have been
27 ts-cal-resolution:
30 ADC resolution used for measuring calibration data
[all …]
Dst,stm32-vref.yaml2 # SPDX-License-Identifier: Apache-2.0
6 compatible: "st,stm32-vref"
8 include: sensor-device.yaml
11 vrefint-cal-addr:
15 Device engineering bytes address containing the factory-measured
16 calibration bandgap voltage (VREFINT_CAL).
18 vrefint-cal-mv:
22 VDDA/VREF+ voltage in millivolts applied during manufacturing to determine
23 the internal bandgap voltage reference VREFINT.
/Zephyr-latest/dts/bindings/adc/
Dnxp,gau-adc.yaml2 # SPDX-License-Identifier: Apache-2.0
7 compatible: "nxp,gau-adc"
10 - name: base.yaml
11 - name: adc-controller.yaml
20 nxp,clock-divider:
27 nxp,power-mode:
31 Default is "full-bias" because it is the reset value.
33 - "full-bias"
34 - "half-bias"
35 default: "full-bias"
[all …]
Dnxp,lpc-lpadc.yaml2 # SPDX-License-Identifier: Apache-2.0
6 compatible: "nxp,lpc-lpadc"
8 include: [adc-controller.yaml, pinctrl-device.yaml]
17 clk-divider:
21 clk-source:
25 voltage-ref:
29 Voltage reference selection. Corresponds to value of
32 - 0
33 - 1
34 - 2
[all …]
Dnxp,s32-adc-sar.yaml2 # SPDX-License-Identifier: Apache-2.0
6 compatible: "nxp,s32-adc-sar"
8 include: [adc-controller.yaml, pinctrl-device.yaml]
17 vref-mv:
20 description: Indicates the reference voltage of the ADC in mV.
22 group-channel:
26 - "precision"
27 - "standard"
28 - "external"
31 high-speed:
[all …]
/Zephyr-latest/drivers/adc/
DKconfig.mcux4 # SPDX-License-Identifier: Apache-2.0
77 prompt "Voltage Reference Selection"
81 bool "Default voltage reference pair V_REFH and V_REFL"
110 bool "Do offset calibration"
112 Do offset calibration
Dadc_esp32.c4 * SPDX-License-Identifier: Apache-2.0
40 /* Due to significant measurement discrepancy in higher voltage range, we
42 * for ESP32-S2 is doing it, so we copy that approach in Zephyr driver
55 /* Default internal reference voltage */
101 return -ENOTSUP; in gain_to_atten()
107 /* Convert voltage by inverted attenuation to support zephyr gain values */
150 LOG_WRN("Skip software calibration - Not supported!"); in adc_calibration_init()
153 LOG_WRN("Skip software calibration - Invalid version!"); in adc_calibration_init()
156 LOG_DBG("Software calibration possible"); in adc_calibration_init()
175 struct adc_esp32_data *data = dev->data; in adc_esp32_dma_conv_done()
[all …]
Dadc_mcux_lpadc.c2 * Copyright 2023-2024 NXP
6 * Copyright (c) 2017-2018, NXP
9 * SPDX-License-Identifier: Apache-2.0
65 const struct mcux_lpadc_config *config = dev->config; in mcux_lpadc_acquisition_time_setup()
88 if (clock_control_get_rate(config->clock_dev, config->clock_subsys, &adc_freq_hz)) { in mcux_lpadc_acquisition_time_setup()
90 return -EINVAL; in mcux_lpadc_acquisition_time_setup()
101 cmd->sampleTimeMode = kLPADC_SampleTimeADCK3; in mcux_lpadc_acquisition_time_setup()
103 cmd->sampleTimeMode = kLPADC_SampleTimeADCK5; in mcux_lpadc_acquisition_time_setup()
105 cmd->sampleTimeMode = kLPADC_SampleTimeADCK7; in mcux_lpadc_acquisition_time_setup()
107 cmd->sampleTimeMode = kLPADC_SampleTimeADCK11; in mcux_lpadc_acquisition_time_setup()
[all …]
Dadc_stm32wb0.c4 * SPDX-License-Identifier: Apache-2.0
9 * - sampling: a single analog-to-digital conversion performed by the ADC
10 * - sequence: one or more sampling(s) performed one after the other by the
13 * - round: all ADC operations needed to read all channels in the adc_sequence passed
20 * - idle mode: clock & ADC configuration that minimizes power consumption
21 * - Only the ADC digital domain clock is turned on:
22 * - ADC is powered off (CTRL.ADC_CTRL_ADC_ON_OFF = 0)
23 * - ADC analog domain clock is turned off
24 * - If applicable:
25 * - ADC LDO is disabled
[all …]
Dadc_mcux_gau_adc.c2 * Copyright 2022-2024 NXP
4 * SPDX-License-Identifier: Apache-2.0
46 const struct mcux_gau_adc_config *config = dev->config; in mcux_gau_adc_channel_setup()
47 struct mcux_gau_adc_data *data = dev->data; in mcux_gau_adc_channel_setup()
48 ADC_Type *base = config->base; in mcux_gau_adc_channel_setup()
49 uint8_t channel_id = channel_cfg->channel_id; in mcux_gau_adc_channel_setup()
50 uint8_t source_channel = channel_cfg->input_positive; in mcux_gau_adc_channel_setup()
53 if (channel_cfg->differential) { in mcux_gau_adc_channel_setup()
55 return -ENOTSUP; in mcux_gau_adc_channel_setup()
60 return -ENOTSUP; in mcux_gau_adc_channel_setup()
[all …]
Dadc_ite_it8xxx2.c4 * SPDX-License-Identifier: Apache-2.0
24 /* ADC internal reference voltage (Unit:mV) */
38 #define ADC_CHANNEL_OFFSET(ch) ((ch)-CHIP_ADC_CH13-ADC_CHANNEL_SHIFT)
98 uint8_t channel_id = channel_cfg->channel_id; in adc_it8xxx2_channel_setup()
100 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in adc_it8xxx2_channel_setup()
102 return -EINVAL; in adc_it8xxx2_channel_setup()
109 return -EINVAL; in adc_it8xxx2_channel_setup()
114 channel_id -= ADC_CHANNEL_SHIFT; in adc_it8xxx2_channel_setup()
117 if (channel_cfg->gain != ADC_GAIN_1) { in adc_it8xxx2_channel_setup()
119 return -EINVAL; in adc_it8xxx2_channel_setup()
[all …]
Dadc_stm32.c9 * SPDX-License-Identifier: Apache-2.0
46 #include <zephyr/dt-bindings/adc/stm32_adc.h>
51 #include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
56 #include <zephyr/linker/linker-defs.h>
81 * compat st_stm32f1_adc -> STM32F1, F37x (ADC1_V2_5)
82 * compat st_stm32f4_adc -> STM32F2, F4, F7, L1
119 /* reference voltage for the ADC */
196 /* Allow ADC to create DMA request and set to one-shot mode as implemented in HAL drivers */ in adc_stm32_enable_dma_support()
213 const struct adc_stm32_cfg *config = dev->config; in adc_stm32_dma_start()
214 ADC_TypeDef *adc = config->base; in adc_stm32_dma_start()
[all …]
/Zephyr-latest/samples/sensor/ina219/
DREADME.rst1 .. zephyr:code-sample:: ina219
3 :relevant-api: sensor_interface
5 Get shunt voltage, bus voltage, power and current from an INA219 sensor.
10 This sample application measures shunt voltage, bus voltage, power and current
12 The calibration/configuration parameters can be set in the devicetree file.
17 - `INA219 sensor <https://www.ti.com/product/INA219>`_
22 The supply voltage of the INA219 can be in the 3V to 5.5V range.
23 The common mode voltage of the measured bus can be in the 0V to 26V range.
28 .. zephyr-app-commands::
29 :zephyr-app: samples/sensor/ina219
[all …]
/Zephyr-latest/include/zephyr/drivers/sensor/
Dscd4x.h4 * SPDX-License-Identifier: Apache-2.0
14 * 0 - 20°C
18 * 0 - 3000m
22 * 700 - 1200hPa
29 /* Set the initial period for automatic self calibration correction in hours. Allowed values
34 /* Set the standard period for automatic self calibration correction in hours. Allowed
45 * must be operated at the voltage desired for the application when performing the FRC sequence.
59 * The self_test command can be used as an end-of-line test to check the sensor functionality
/Zephyr-latest/drivers/sensor/st/stm32_vref/
Dstm32_vref.c4 * SPDX-License-Identifier: Apache-2.0
39 struct stm32_vref_data *data = dev->data; in stm32_vref_sample_fetch()
40 struct adc_sequence *sp = &data->adc_seq; in stm32_vref_sample_fetch()
45 return -ENOTSUP; in stm32_vref_sample_fetch()
48 k_mutex_lock(&data->mutex, K_FOREVER); in stm32_vref_sample_fetch()
49 pm_device_runtime_get(data->adc); in stm32_vref_sample_fetch()
51 rc = adc_channel_setup(data->adc, &data->adc_cfg); in stm32_vref_sample_fetch()
53 LOG_DBG("Setup AIN%u got %d", data->adc_cfg.channel_id, rc); in stm32_vref_sample_fetch()
57 path = LL_ADC_GetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(data->adc_base)); in stm32_vref_sample_fetch()
58 LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(data->adc_base), in stm32_vref_sample_fetch()
[all …]
/Zephyr-latest/drivers/sensor/ti/ina23x/
Dina230.c5 * SPDX-License-Identifier: Apache-2.0
16 /** @brief Calibration scaling value (value scaled by 100000) */
19 /** @brief The LSB value for the bus voltage register, in microvolts/LSB. */
30 struct ina230_data *data = dev->data; in ina230_channel_get()
31 const struct ina230_config *const config = dev->config; in ina230_channel_get()
37 bus_uv = data->bus_voltage * config->uv_lsb; in ina230_channel_get()
39 /* convert to fractional volts (units for voltage channel) */ in ina230_channel_get()
40 val->val1 = bus_uv / 1000000U; in ina230_channel_get()
41 val->val2 = bus_uv % 1000000U; in ina230_channel_get()
46 current_ua = data->current * config->current_lsb; in ina230_channel_get()
[all …]
Dina237.c4 * SPDX-License-Identifier: Apache-2.0
14 #include <zephyr/dt-bindings/sensor/ina237.h>
19 /** @brief Calibration scaling value (scaled by 10^-5) */
22 /** @brief The LSB value for the bus voltage register, in microvolts/LSB. */
29 * @brief Scale die temperture from 0.125 degC/bit to micro-degrees C
36 val->val1 = value_microX / 1000000L; in micro_s32_to_sensor_value()
37 val->val2 = value_microX % 1000000L; in micro_s32_to_sensor_value()
42 val->val1 = value_microX / 1000000U; in micro_u64_to_sensor_value()
43 val->val2 = value_microX % 1000000U; in micro_u64_to_sensor_value()
49 const struct ina237_data *data = dev->data; in ina237_channel_get()
[all …]
/Zephyr-latest/drivers/sensor/ti/ina226/
Dina226.c4 * SPDX-License-Identifier: Apache-2.0
13 #include <zephyr/dt-bindings/sensor/ina226.h>
58 /** @brief Calibration scaling value (scaled by 10^-5) */
61 /** @brief The LSB value for the bus voltage register, in microvolts/LSB. */
64 /** @brief The LSB value for the shunt voltage register, in microvolts/LSB. */
98 val->val1 = value_microX / 1000000L; in micro_s32_to_sensor_value()
99 val->val2 = value_microX % 1000000L; in micro_s32_to_sensor_value()
105 const struct ina226_data *data = dev->data; in ina226_channel_get()
106 const struct ina226_config *config = dev->config; in ina226_channel_get()
110 micro_s32_to_sensor_value(val, INA226_BUS_VOLTAGE_TO_uV(data->bus_voltage)); in ina226_channel_get()
[all …]
/Zephyr-latest/soc/ite/ec/it8xxx2/
DKconfig2 # SPDX-License-Identifier: Apache-2.0
20 # https://www.ite.com.tw/uploads/product_download/it81202-bx-chip-errata.pdf
118 On IT81202 (128-pins package), the pins of GPIO group K and L aren't
119 bonding with pad. So we configure these pins as internal pull-down
127 floating internally. We need to enable internal pull-down for the pin
145 The clock_frequency of ite,it8xxx2-i2c node (i2c0, i2c1, and i2c2) will
152 - GPIOA0 -> TCK
153 - GPIOA1 -> TDI
154 - GPIOA4 -> TDO
155 - GPIOA5 -> TMS
[all …]
Dsoc.c4 * SPDX-License-Identifier: Apache-2.0
15 #include <zephyr/dt-bindings/interrupt-controller/ite-intc.h>
34 /* PLL Frequency Auto-Calibration Control 0 Register */
44 /* PLL Frequency Auto-Calibration Control 2 Register */
79 return -ERANGE; in chip_get_pll_freq()
191 IT8XXX2_ECPM_PLLFREQR = pll->pll_freq; in chip_run_pll_sequence()
192 /* Pre-set FND clock frequency = PLL / 3 */ in chip_run_pll_sequence()
195 IT8XXX2_ECPM_SCDCR3 = (pll->div_jtag << 4) | pll->div_ec; in chip_run_pll_sequence()
201 IT8XXX2_ECPM_SCDCR0 = (pll->div_fnd << 4) | pll->div_mcu; in chip_run_pll_sequence()
205 IT8XXX2_ECPM_SCDCR1 = (pll->div_usb << 4) | pll->div_uart; in chip_run_pll_sequence()
[all …]
/Zephyr-latest/drivers/sensor/st/stm32_temp/
Dstm32_temp.c5 * SPDX-License-Identifier: Apache-2.0
90 /* On all STM32 series, the calibration data is stored in fetch_mfg_data()
91 * as 16-bit data in the manufacturing flash region in fetch_mfg_data()
104 /* Disable the ICACHE to ensure all memory accesses are non-cacheable. in read_calibration_data()
106 * accessed in non-cacheable mode - otherwise, a bus error occurs. in read_calibration_data()
111 calib_data[0] = fetch_mfg_data(cfg->ts_cal1_addr); in read_calibration_data()
113 calib_data[1] = fetch_mfg_data(cfg->ts_cal2_addr); in read_calibration_data()
118 /* Re-enable the ICACHE (unconditonally - it should always be turned on) */ in read_calibration_data()
126 struct stm32_temp_data *data = dev->data; in convert_adc_sample_to_temperature()
127 const struct stm32_temp_config *cfg = dev->config; in convert_adc_sample_to_temperature()
[all …]
/Zephyr-latest/dts/arm/nxp/
Dnxp_mcxa156.dtsi4 * SPDX-License-Identifier: Apache-2.0
8 #include <arm/armv8-m.dtsi>
9 #include <zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h>
10 #include <zephyr/dt-bindings/gpio/gpio.h>
11 #include <zephyr/dt-bindings/i2c/i2c.h>
15 #address-cells = <1>;
16 #size-cells = <0>;
19 compatible = "arm,cortex-m33f";
21 #address-cells = <1>;
22 #size-cells = <1>;
[all …]
/Zephyr-latest/include/zephyr/drivers/
Dcharger.h4 * SPDX-License-Identifier: Apache-2.0
57 /** Configuration of charge voltage regulation target in µV */
67 * Configuration of the input voltage regulation target in µV
69 * This value is a falling voltage threshold that is regulated by reducing the charge
88 * Configuration of the falling system voltage threshold where a notification
107 * Reserved to demark downstream custom properties - use this value as the actual value may
196 /** The battery voltage has exceeded its overvoltage threshold */
209 /** The charger device requires calibration */
355 const struct charger_driver_api *api = (const struct charger_driver_api *)dev->api; in z_impl_charger_get_prop()
357 return api->get_property(dev, prop, val); in z_impl_charger_get_prop()
[all …]
Dadc.h10 * SPDX-License-Identifier: Apache-2.0
17 #include <zephyr/dt-bindings/adc/adc.h>
71 * @retval -EINVAL if the gain could not be interpreted
104 * Value range is 0-16383 for a given unit.
110 * This value primarily identifies the channel within the ADC API - when
125 * While this API allows identifiers from range 0-31, particular drivers
132 /** Channel type: single-ended or differential. */
164 * Output pins for the bias voltage.
185 * #address-cells = <1>;
186 * #size-cells = <0>;
[all …]
/Zephyr-latest/drivers/clock_control/
Dclock_stm32_ll_u5.c6 * SPDX-License-Identifier: Apache-2.0
150 return -ENOTSUP; in enabled_clock()
161 if (IN_RANGE(pclken->bus, STM32_PERIPH_BUS_MIN, STM32_PERIPH_BUS_MAX) == 0) { in stm32_clock_control_on()
163 return -ENOTSUP; in stm32_clock_control_on()
166 sys_set_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + pclken->bus, in stm32_clock_control_on()
167 pclken->enr); in stm32_clock_control_on()
169 temp = sys_read32(DT_REG_ADDR(DT_NODELABEL(rcc)) + pclken->bus); in stm32_clock_control_on()
182 if (IN_RANGE(pclken->bus, STM32_PERIPH_BUS_MIN, STM32_PERIPH_BUS_MAX) == 0) { in stm32_clock_control_off()
184 return -ENOTSUP; in stm32_clock_control_off()
187 sys_clear_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + pclken->bus, in stm32_clock_control_off()
[all …]

123