Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 45:f5f553b8c0d5, committed 2020-01-20
- Comitter:
- Vkadaba
- Date:
- Mon Jan 20 10:40:06 2020 +0000
- Parent:
- 44:94bdfaefddac
- Child:
- 46:2c697a0cbbed
- Commit message:
- Added AVDD support
Changed in this revision
--- a/bridge_4w_load_cell_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/bridge_4w_load_cell_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -50,6 +50,8 @@
.powerMode = ADMW1001_POWER_MODE_ACTIVE,
},
.measurement = {
+ .externalRefVoltage=0.0,
+ .AVDDVoltage=3.0,
.operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS,
.dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!!
.groundSwitch = ADMW1001_ADC_GND_SW_CLOSED,
@@ -59,14 +61,14 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ // .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
.enableChannel = true,
.disablePublishing = false,
.compensationChannel = ADMW1001_CH_ID_NONE,
- .lutSelect = ADMW1001_LUT_DEFAULT,
+ .lutSelect = ADMW1001_LUT_CUSTOM,
.measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED,
.lowThreshold = 0,
.highThreshold = 45359.2,
@@ -75,7 +77,7 @@
.sensorParameter = 0.0,
.measurementsPerCycle = 1,
.cycleSkipCount = 0,
- .extraSettlingTime = 4499.99986449257,
+ .extraSettlingTime = 5,
.priority = 0,
.adcChannelConfig = {
.sensor = ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1,
@@ -92,4 +94,4 @@
},
},
},
-};
+};
\ No newline at end of file
--- a/common/platform.h Thu Jan 16 06:52:27 2020 +0000
+++ b/common/platform.h Mon Jan 20 10:40:06 2020 +0000
@@ -81,7 +81,7 @@
.misoPin = PLATFORM_SPI_MISO, \
.sckPin = PLATFORM_SPI_SCK, \
.csPin = PLATFORM_SPI_CS, \
- .maxSpeedHz = 1600000, \
+ .maxSpeedHz = 1000000, \
}, \
.gpio = { \
.resetPin = PLATFORM_GPIO_RESET, \
--- a/i2c0_sensirionSHT3X_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/i2c0_sensirionSHT3X_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -57,7 +57,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_DIG_I2C_0] = {
@@ -67,7 +67,7 @@
.compensationChannel = ADMW1001_CH_ID_NONE,
.measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED,
.measurementsPerCycle = 1,
- .extraSettlingTime = 15000,
+ .extraSettlingTime = 15,
.i2cChannelConfig = {
.sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B,
},
--- a/inc/admw1001/admw1001_config.h Thu Jan 16 06:52:27 2020 +0000
+++ b/inc/admw1001/admw1001_config.h Mon Jan 20 10:40:06 2020 +0000
@@ -58,7 +58,8 @@
#define ADMW1001_SENSOR_COMMAND_MAX_LENGTH 7
/*! ADMW1001 channel priority options */
-typedef enum {
+typedef enum
+{
ADMW1001_CHANNEL_PRIORITY_0 = 0,
ADMW1001_CHANNEL_PRIORITY_1,
ADMW1001_CHANNEL_PRIORITY_2,
@@ -79,7 +80,8 @@
} ADMW1001_CHANNEL_PRIORITY;
/*! ADMW1001 operating mode options */
-typedef enum {
+typedef enum
+{
ADMW1001_OPERATING_MODE_SINGLECYCLE = 0,
/*!< Executes a single measurement cycle and stops */
ADMW1001_OPERATING_MODE_CONTINUOUS,
@@ -90,7 +92,8 @@
} ADMW1001_OPERATING_MODE;
/*! ADMW1001 data ready mode options */
-typedef enum {
+typedef enum
+{
ADMW1001_DATAREADY_PER_CONVERSION = 0,
/*!< The DATAREADY signal is asserted after completion of each conversion
* - a single data sample only from the latest completed conversion is
@@ -111,7 +114,8 @@
} ADMW1001_DATAREADY_MODE;
/*! ADMW1001 power mode options */
-typedef enum {
+typedef enum
+{
ADMW1001_POWER_MODE_HIBERNATION = 0,
/*!< module has entede hibernation mode. All analog circuitry is disabled. All peripherals disabled apart from the Wake-up pin functionality. */
ADMW1001_POWER_MODE_ACTIVE,
@@ -120,7 +124,8 @@
} ADMW1001_POWER_MODE;
/*! ADMW1001 measurement analog filter settling options */
-typedef enum {
+typedef enum
+{
ADMW1001_FILTER_SETTLING_ALWAYS = 0,
/*!< Allow full settling time to elapse between every measurement from an analog sensor */
ADMW1001_FILTER_SETTLING_FAST,
@@ -133,7 +138,8 @@
* Optionally select a measurement unit for final conversion results.
* Currently applicable only to specific temperature sensor types.
*/
-typedef enum {
+typedef enum
+{
ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED = 0,
/*!< No measurement unit specified */
ADMW1001_MEASUREMENT_UNIT_CELSIUS,
@@ -143,30 +149,8 @@
} ADMW1001_MEASUREMENT_UNIT;
-/*! ADMW1001 Open-Sensor Diagnostics frequency
- *
- * Select the per-cycle frequency at which open-sensor diagnostic
- * checks should be performed. Open-sensor diagnostic checks typically require
- * specific or time-consuming processing which cannot be executed while a
- * measurement cycle is running.
- *
- * @note Open-sensor diagnostic checks, when performed, will add a delay to the
- * start of the next measurement cycle.
- */
-typedef enum {
- ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED = 0,
- /*!< No Open-Sensor Detection is performed */
- ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE,
- /*!< No Open-Sensor Detection is performed prior to each cycle */
- ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES,
- /*!< No Open-Sensor Detection is performed at intervals of 100 cycles */
- ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES,
- /*!< No Open-Sensor Detection is performed at intervals of 1001 cycles */
-
-} ADMW1001_OPEN_SENSOR_DIAGNOSTICS;
-
-
-typedef enum {
+typedef enum
+{
ADMW1001_BUFFER_BYPASSS_DISABLED = 0,
/*!< Buffer Bypass Disabled */
ADMW1001_BUFFER_BYPASSS_ENABLED,
@@ -178,7 +162,8 @@
*
* @note applicable only to ADC analog sensor channels
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_RTD_CURVE_EUROPEAN = 0,
/*!< EUROPEAN RTD curve used. */
ADMW1001_ADC_RTD_CURVE_AMERICAN,
@@ -193,7 +178,8 @@
*
* @note applicable only to ADC analog sensor channels
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_GAIN_1X = 0,
/*!< no amplification gain */
ADMW1001_ADC_GAIN_2X,
@@ -218,11 +204,13 @@
* @note applicable only to ADC analog sensor channels, and
* specific sensor types
*/
-typedef enum {
- ADMW1001_ADC_EXC_STATE_CYCLE_POWER=0,
+typedef enum
+{
+ ADMW1001_ADC_EXC_STATE_CYCLE_POWER = 0,
/*!< Excitation for measurement is active only during measurement */
ADMW1001_ADC_EXC_STATE_ALWAYS_ON,
/*!< Excitation for measurement is always on */
+
} ADMW1001_ADC_EXC_STATE;
/*! ADMW1001 analog sensor excitation current output level options
@@ -230,7 +218,8 @@
* @note applicable only to ADC analog sensor channels, and
* specific sensor types
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT = -1,
/*!< NO External excitation is provided */
ADMW1001_ADC_EXC_CURRENT_EXTERNAL = 0,
@@ -252,7 +241,8 @@
*
* @note applicable only to a diode sensor
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_100UA = 0,
/**< 2 Current measurement 10uA 100uA */
ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_160UA,
@@ -277,7 +267,8 @@
* @note applicable only to ADC analog sensor channels, and
* specific sensor types
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL = 0,
/*!< Internal VRef - 1.2V */
ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1,
@@ -293,7 +284,8 @@
*
* @note applicable only to ADC analog sensor channels
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_GND_SW_OPEN = 0,
/*!< Ground switch not enabled for measurement. */
ADMW1001_ADC_GND_SW_CLOSED,
@@ -305,7 +297,8 @@
*
* @note applicable only to ADC analog sensor channels
*/
-typedef enum {
+typedef enum
+{
ADMW1001_CHOP_MD_NONE = 0,
/*!< No chop performed. */
ADMW1001_CHOP_MD_HW,
@@ -321,7 +314,8 @@
*
* @note applicable only to ADC analog sensor channels
*/
-typedef enum {
+typedef enum
+{
ADMW1001_ADC_FILTER_SINC4 = 0,
/*!< SINC4 - 4th order sinc response filter */
ADMW1001_ADC_FILTER_SINC3,
@@ -335,7 +329,8 @@
* @note SF must be set in conjunction with chop mode
* and sinc filter type to achieve the desired sampling rate.
*/
-typedef enum {
+typedef enum
+{
ADMW1001_SF_976HZ = 0,
/*!< SF setting for 976Hz sample rate. */
ADMW1001_SF_488HZ = 1,
@@ -361,7 +356,8 @@
*
* @note applicable only for I2C sensors
*/
-typedef enum {
+typedef enum
+{
ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K = 0,
/*!< 100kHz I2C clock speed */
ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K,
@@ -373,7 +369,8 @@
*
* @note applicable only for SPI sensors
*/
-typedef enum {
+typedef enum
+{
ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0,
/*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */
ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_1,
@@ -389,7 +386,8 @@
*
* @note applicable only for SPI sensors
*/
-typedef enum {
+typedef enum
+{
ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_8MHZ = 0,
/*!< SPI Clock Speed configured to 8MHz */
ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_4MHZ,
@@ -426,7 +424,8 @@
} ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK;
/*! ADMW1001 Power Configuration options */
-typedef struct {
+typedef struct
+{
ADMW1001_POWER_MODE powerMode;
/*!< Power mode selection */
@@ -437,7 +436,8 @@
* @note required only when ADMW1001_OPERATING_MODE_MULTICYCLE is selected
* as the operatingMode (@ref ADMW1001_MEASUREMENT_CONFIG)
*/
-typedef struct {
+typedef struct
+{
uint32_t cyclesPerBurst;
/*!< Number of cycles to complete for a single burst */
uint32_t burstInterval;
@@ -446,7 +446,8 @@
} ADMW1001_MULTICYCLE_CONFIG;
/*! ADMW1001 Measurement Configuration options */
-typedef struct {
+typedef struct
+{
ADMW1001_OPERATING_MODE operatingMode;
/*!< Operating mode - specifies how measurement cycles are scheduled */
ADMW1001_DATAREADY_MODE dataReadyMode;
@@ -463,10 +464,10 @@
* configurations, settling time is always skipped between consecutive
* measurements in a measurement cycle.
*/
- ADMW1001_ADC_EXC_STATE excitationState;
+ uint8_t excitationState;
/*!< Excitation current state */
- ADMW1001_ADC_GND_SW groundSwitch;
- /*!< Option to open or close sensor ground switch */
+ uint8_t groundSwitch;
+ /*!< Option to open or close sensor ground switch */
uint8_t reserved0;
/*!< Reserved for future use and ensure word alignment.
*/
@@ -489,7 +490,12 @@
float32_t externalRefVoltage;
/*!< External Reference Voltage.
*/
- uint32_t reserved1[2];
+ float32_t AVDDVoltage;
+ /*!< AVDD Voltage.
+ */
+ uint32_t reserved1[1];
+ /*!< Reserved for future use and ensure word alignment.
+ */
} ADMW1001_MEASUREMENT_CONFIG;
@@ -498,11 +504,13 @@
* @note applicable only to ADC analog sensor channels, and
* specific sensor types
*/
-typedef struct {
+typedef struct
+{
ADMW1001_ADC_EXC_CURRENT outputLevel;
/*!< Excitation current output level */
ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO diodeRatio;
/*!< Excitation current output diode ratio */
+ float32_t idealityRatio;
} ADMW1001_ADC_EXC_CURRENT_CONFIG;
@@ -510,7 +518,8 @@
*
* @note applicable only to ADC analog sensor channels
*/
-typedef struct {
+typedef struct
+{
ADMW1001_ADC_FILTER_TYPE type;
/*!< Filter type selection */
ADMW1001_SINC_FILTER_RANGE sf;
@@ -519,13 +528,15 @@
/*!< Enable filter chop */
bool notch1p2;
/*!< Enable Notch 2 Filter Mode */
+
} ADMW1001_ADC_FILTER_CONFIG;
/*! ADMW1001 ADC analog channel configuration details
*
* @note applicable only to ADC analog sensor channels
*/
-typedef struct {
+typedef struct
+{
ADMW1001_ADC_SENSOR_TYPE sensor;
/*!< Sensor type selection */
ADMW1001_ADC_RTD_CURVE rtdCurve;
@@ -537,10 +548,9 @@
ADMW1001_ADC_FILTER_CONFIG filter;
/*!< ADC Filter configuration */
ADMW1001_ADC_REFERENCE_TYPE reference;
- bool vBiasEnable;
/*!< ADC Reference configuration */
uint8_t bufferBypass;
- /*!< Buffer Bypass configuration */
+ /*!< Buffer Bypass configuration */
uint8_t reserved0[2];
/*!< Reserved for future use and ensure word alignment. */
uint32_t reserved1[6];
@@ -551,14 +561,13 @@
/*! ADMW1001 look-up table selection
* Select table used to linearise the measurement.
*/
-typedef enum {
+typedef enum
+{
ADMW1001_LUT_DEFAULT = 0,
/*!< Default LUT */
- ADMW1001_LUT_UNITY = 1,
- /*!< Unity LUT */
- ADMW1001_LUT_CUSTOM = 2,
+ ADMW1001_LUT_CUSTOM = 1,
/*!< User defined custom LUT */
- ADMW1001_LUT_RESERVED = 3,
+ ADMW1001_LUT_RESERVED = 2,
/*!< Reserved for future use */
} ADMW1001_LUT_SELECT;
@@ -567,7 +576,8 @@
*
* @note applicable only to SPI and I2C digital sensor channels
*/
-typedef enum {
+typedef enum
+{
ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE = 0,
/**< None/Invalid - data format is ignored if coding is set to this value */
ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR,
@@ -584,7 +594,8 @@
*
* @note applicable only to SPI and I2C digital sensor channels
*/
-typedef struct {
+typedef struct
+{
ADMW1001_DIGITAL_SENSOR_DATA_CODING coding;
/**< Data Encoding of Sensor Result */
bool littleEndian;
@@ -606,7 +617,8 @@
*
* @note applicable only to SPI and I2C digital sensor channels
*/
-typedef struct {
+typedef struct
+{
uint8_t command[ADMW1001_SENSOR_COMMAND_MAX_LENGTH];
/*!< Optional command bytes to send to the device */
uint8_t commandLength;
@@ -618,7 +630,8 @@
*
* @note applicable only to digital sensor channels
*/
-typedef struct {
+typedef struct
+{
uint32_t calibrationParam;
/*!< Independently established environmental variable used during calibration
* of a digital sensor. Used only if the sensor supports calibration
@@ -635,7 +648,8 @@
*
* @note applicable only to digital sensor channels
*/
-typedef struct {
+typedef struct
+{
bool useCustomCommsConfig;
/*!< Optional parameter to enable user digital communication settings */
ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED i2cClockSpeed;
@@ -651,7 +665,8 @@
*
* @note applicable only to I2C digital sensor channels
*/
-typedef struct {
+typedef struct
+{
ADMW1001_I2C_SENSOR_TYPE sensor;
/*!< Sensor type selection */
uint8_t deviceAddress;
@@ -692,7 +707,8 @@
*
* @note applicable only to SPI digital sensor channels
*/
-typedef struct {
+typedef struct
+{
ADMW1001_SPI_SENSOR_TYPE sensor;
/*!< Sensor type selection */
uint8_t reserved[2];
@@ -728,7 +744,8 @@
} ADMW1001_SPI_CHANNEL_CONFIG;
/*! ADMW1001 Measurement Channel configuration details */
-typedef struct {
+typedef struct
+{
bool enableChannel;
/*!< Option to include this channel in normal measurement cycles */
bool disablePublishing;
@@ -793,7 +810,7 @@
*/
uint32_t extraSettlingTime;
/*!< A minimum settling time is applied internally for each channel, based
- * on the sensor type. However, additional settling time (microseconds)
+ * on the sensor type. However, additional settling time (milliseconds)
* can optionally be specified. Set to 0 if not required.
*/
ADMW1001_CHANNEL_PRIORITY priority;
@@ -805,7 +822,8 @@
* ID. Lower numbers indicate higher priority, with 0 being the highest.
* Set to 0 if not required.
*/
- union {
+ union
+ {
ADMW1001_ADC_CHANNEL_CONFIG adcChannelConfig;
/*!< ADC channel configuration - applicable only to ADC channels */
ADMW1001_I2C_CHANNEL_CONFIG i2cChannelConfig;
@@ -821,7 +839,8 @@
} ADMW1001_CHANNEL_CONFIG;
/*! ADMW1001 Diagnostics configuration details */
-typedef struct {
+typedef struct
+{
bool disableGlobalDiag;
/*!< Option to disable the following diagnostic checks on the ADC:
* - Reference Detection errors
@@ -838,7 +857,7 @@
* temperature of the ADMW1001 has exceeded critical limits
*/
- ADMW1001_OPEN_SENSOR_DIAGNOSTICS osdFrequency;
+ uint8_t osdFrequency;
/*!< Option to enable Open-Circuit Detection at a selected cycle interval */
} ADMW1001_DIAGNOSTICS_CONFIG;
@@ -846,7 +865,8 @@
typedef uint16_t ADMW1001_ADVANCED_ACCESS_KEY;
/*! ADMW1001 Device configuration details */
-typedef struct {
+typedef struct
+{
ADMW1001_POWER_CONFIG power;
/*!< Power configuration details */
ADMW1001_MEASUREMENT_CONFIG measurement;
--- a/main.cpp Thu Jan 16 06:52:27 2020 +0000 +++ b/main.cpp Mon Jan 20 10:40:06 2020 +0000 @@ -57,7 +57,7 @@ extern ADMW_CONFIG multichannel_singlecycle_config; extern ADMW_CONFIG i2c0_sensirionSHT3X_config; /* Change the following pointer to select any of the configurations above */ -static ADMW_CONFIG *pSelectedConfig = &rtd_4w_config; +static ADMW_CONFIG *pSelectedConfig = &bridge_4w_load_cell_config; static ADMW_CONNECTION connectionInfo = PLATFORM_CONNECTION_INFO;
--- a/multichannel_continuous_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/multichannel_continuous_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -63,7 +63,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
--- a/multichannel_singlecycle_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/multichannel_singlecycle_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -61,7 +61,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
--- a/rtd_3w_pt100_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/rtd_3w_pt100_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -62,7 +62,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
--- a/rtd_4w_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/rtd_4w_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -61,7 +61,6 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
--- a/src/admw_1001.c Thu Jan 16 06:52:27 2020 +0000
+++ b/src/admw_1001.c Mon Jan 20 10:40:06 2020 +0000
@@ -1152,6 +1152,15 @@
return ADMW_SUCCESS;
}
+static ADMW_RESULT admw_SetAVDDVoltage(
+ ADMW_DEVICE_HANDLE hDevice,
+ float32_t AVDDVoltage)
+ {
+
+ WRITE_REG_FLOAT(hDevice, AVDDVoltage, CORE_AVDD_VOLTAGE);
+
+ return ADMW_SUCCESS;
+ }
ADMW_RESULT admw1001_SetMeasurementConfig(
ADMW_DEVICE_HANDLE hDevice,
@@ -1180,7 +1189,11 @@
eRet = admw_SetExternalReferenceValues(hDevice,
pMeasConfig->externalRef1Value);
}
-
+ if((pMeasConfig->AVDDVoltage >= 3.0) && (pMeasConfig->AVDDVoltage <= 3.6))
+ {
+ eRet = admw_SetAVDDVoltage(hDevice,
+ pMeasConfig->AVDDVoltage);
+ }
if (eRet != ADMW_SUCCESS) {
ADMW_LOG_ERROR("Failed to set external reference values");
return eRet;
@@ -1511,7 +1524,6 @@
switch (pChannelConfig->lutSelect) {
case ADMW1001_LUT_DEFAULT:
- case ADMW1001_LUT_UNITY:
case ADMW1001_LUT_CUSTOM:
sensorDetailsReg.LUT_Select = pChannelConfig->lutSelect;
break;
--- a/thermocouple_typeJ_cjc0_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/thermocouple_typeJ_cjc0_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -63,7 +63,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
--- a/thermocouple_typeK_cjc0_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/thermocouple_typeK_cjc0_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -66,7 +66,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
@@ -80,7 +80,7 @@
.offsetAdjustment = 0.0,
.gainAdjustment = 0.0,
.sensorParameter = 0.0,
- .measurementsPerCycle = 10,
+ .measurementsPerCycle = 1,
.cycleSkipCount = 0,
.extraSettlingTime = 0,
.priority = 0,
@@ -113,9 +113,9 @@
.offsetAdjustment = 0.0,
.gainAdjustment = 0.0,
.sensorParameter = 0.0,
- .measurementsPerCycle = 10,
+ .measurementsPerCycle = 1,
.cycleSkipCount = 0,
- .extraSettlingTime = 4499.99986449257,
+ .extraSettlingTime = 5,
.priority = 0,
.adcChannelConfig = {
.sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K,
--- a/thermocouple_typeT_cjc0_config.c Thu Jan 16 06:52:27 2020 +0000
+++ b/thermocouple_typeT_cjc0_config.c Mon Jan 20 10:40:06 2020 +0000
@@ -60,7 +60,7 @@
.diagnostics = {
.disableGlobalDiag = true,
.disableMeasurementDiag = true,
- .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
+ .osdFrequency = 0,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {