ADMW1001_Beta_Release
/
EV-PRO-MW1001_initialCommit
initial commit
Revision 56:38b36e947602, committed 2020-02-24
- Comitter:
- Vkadaba
- Date:
- Mon Feb 24 08:49:25 2020 +0000
- Parent:
- 55:215da406282b
- Commit message:
- Config files updated and minor code changes
Changed in this revision
diff -r 215da406282b -r 38b36e947602 bridge_4w_load_cell_config.c --- a/bridge_4w_load_cell_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/bridge_4w_load_cell_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -53,40 +53,34 @@ .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, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - // .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, + .vBiasEnable = false, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_CLOSED, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { .enableChannel = true, .disablePublishing = false, .compensationChannel = ADMW1001_CH_ID_NONE, - .lutSelect = ADMW1001_LUT_CUSTOM, + .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, + .extraSettlingTime = 4.49999986449257, .lowThreshold = 0, .highThreshold = 45359.2, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 5, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1, - .gain = ADMW1001_ADC_GAIN_32X, + .gain = ADMW1001_ADC_GAIN_8X, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED,
diff -r 215da406282b -r 38b36e947602 common/utils.c --- a/common/utils.c Mon Feb 24 07:04:35 2020 +0000 +++ b/common/utils.c Mon Feb 24 08:49:25 2020 +0000 @@ -132,18 +132,15 @@ uint32_t nNumSamples, ADMW_MEASUREMENT_MODE eMeasurementMode) { - static uint32_t samplesCounter; for (uint32_t i = 0; i < nNumSamples; i++) { - ADMW_LOG_INFO("Sample # %2d Channel # %2d :: Raw %X %f :: Processed %f :: flags:%s%s", + ADMW_LOG_INFO("Sample # %2d Channel # %2d :: Raw %f :: Processed %f :: flags: ERROR:%X , ALERT:%X", i+1, pSampleBuffer[i].channelId, - pSampleBuffer[i].rawValue, (pSampleBuffer[i].rawValue/1024.0), + pSampleBuffer[i].rawValue, pSampleBuffer[i].processedValue, - pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR ? " ERROR" : "", - pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ? " ALERT" : ""); + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR, + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ); } - samplesCounter++; - ADMW_LOG_INFO("Sample count=%d",samplesCounter); } static void gpioCallbackFn(ADMW_GPIO_PIN ePinId, void * pArg) @@ -239,7 +236,6 @@ ADMW_MEASUREMENT_MODE eMeasurementMode) { ADMW_RESULT res; - static uint32_t samplesLost; volatile bool bDataReady = false; volatile bool bError = false; volatile bool bAlert = false; @@ -318,9 +314,7 @@ */ ADMW_LOG_DEBUG("Retrieved %u of %u requested data samples", - nReturned, nSamplesPerDataready); - samplesLost++; - ADMW_LOG_INFO("samples lost=%d",samplesLost); + nReturned, nSamplesPerDataready); continue; } else { ADMW_LOG_WARN("Failed to get data samples from device");
diff -r 215da406282b -r 38b36e947602 i2c0_sensirionSHT3X_config.c --- a/i2c0_sensirionSHT3X_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/i2c0_sensirionSHT3X_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -50,29 +50,25 @@ .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!! + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, }, .channels = { [ADMW1001_CH_ID_DIG_I2C_0] = { .enableChannel = true, -// .gain = ADMW1001_ADC_GAIN_1X, .disablePublishing = false, .compensationChannel = ADMW1001_CH_ID_NONE, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, .measurementsPerCycle = 1, - .extraSettlingTime = 15, + .extraSettlingTime = 99.5000014663674, .i2cChannelConfig = { .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B, }, } }, }, -}; - +}; \ No newline at end of file
diff -r 215da406282b -r 38b36e947602 inc/admw_api.h --- a/inc/admw_api.h Mon Feb 24 07:04:35 2020 +0000 +++ b/inc/admw_api.h Mon Feb 24 08:49:25 2020 +0000 @@ -175,7 +175,7 @@ /*!< The measurement channel from which this sample was obtained */ uint8_t measurementStatus; /*!< The measurement status from the DMZ layer */ - uint32_t rawValue; + float32_t rawValue; /*!< The raw (unprocessed) value obtained directly from the measurement * channel, if available */ @@ -769,7 +769,6 @@ ADMW_RESULT admw1001_sendRun( ADMW_DEVICE_HANDLE const hDevice); ADMW_RESULT admw_deviceInformation(ADMW_DEVICE_HANDLE hDevice); -ADMW_RESULT admw_readMbedVersion(); #ifdef __cplusplus }
diff -r 215da406282b -r 38b36e947602 inc/mbedVersion.h --- a/inc/mbedVersion.h Mon Feb 24 07:04:35 2020 +0000 +++ b/inc/mbedVersion.h Mon Feb 24 08:49:25 2020 +0000 @@ -22,8 +22,8 @@ * environment. */ #define MBED_HOST_MAJOR 0x01 -#define MBED_HOST_MINOR 0x12 -#define MBED_HOST_BUILD 0x0061 +#define MBED_HOST_MINOR 0x02 +#define MBED_HOST_BUILD 0x0002 #endif
diff -r 215da406282b -r 38b36e947602 main.cpp --- a/main.cpp Mon Feb 24 07:04:35 2020 +0000 +++ b/main.cpp Mon Feb 24 08:49:25 2020 +0000 @@ -50,6 +50,7 @@ #include "admw1001/ADMW1001_REGISTERS.h" #include "admw1001/admw1001_lut_data.h" #include "admw1001/admw1001_host_comms.h" +#include "mbedVersion.h" extern ADMW_CONFIG thermocouple_typeK_cjc0_config; extern ADMW_CONFIG thermocouple_typeT_cjc0_config; @@ -64,7 +65,7 @@ extern ADMW_CONFIG measureware_config; /* Change the following pointer to load or change the configurations */ -static ADMW_CONFIG *pSelectedConfig = &bridge_4w_load_cell_config; +static ADMW_CONFIG *pSelectedConfig = &multichannel_continuous_config; /* use the following to load LUT */ extern ADMW1001_LUT_DESCRIPTOR *lut_desc_list[]; @@ -76,13 +77,12 @@ int main() { - ADMW_RESULT res; ADMW_STATUS status; ADMW_DEVICE_HANDLE hDevice; ADMW_MEASUREMENT_MODE eMeasurementMode = ADMW_MEASUREMENT_MODE_NORMAL; bool bDeviceReady; - admw_readMbedVersion(); + /* * Open an ADMW1001 device instance. */ @@ -91,7 +91,7 @@ ADMW_LOG_ERROR("Failed to open device instance"); return res; } - + ADMW_LOG_INFO("Mbed Firmware version is %X.%X.%X",MBED_HOST_MAJOR,MBED_HOST_MINOR,MBED_HOST_BUILD); /* * Reset the given ADMW1001 device.... */
diff -r 215da406282b -r 38b36e947602 mbed_release.txt --- a/mbed_release.txt Mon Feb 24 07:04:35 2020 +0000 +++ b/mbed_release.txt Mon Feb 24 08:49:25 2020 +0000 @@ -11,6 +11,7 @@ - Printing correct Raw values from the sensor - Added funcionality to read the Mbed FW version - Added release notes +- updated all the config files ================================================================================ v01.01.0001 (18 February 2020)
diff -r 215da406282b -r 38b36e947602 multichannel_continuous_config.c --- a/multichannel_continuous_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/multichannel_continuous_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -42,7 +42,7 @@ #include "admw_config_types.h" ADMW_CONFIG multichannel_continuous_config = { - .versionId = { .major = 2, .minor = 0 }, + .versionId = { .major = 2, .minor = 0 }, .productId = ADMW_PRODUCT_ID_ADMW1001, .admw1001 = { .power = { @@ -50,20 +50,14 @@ }, .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!! - .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON, - .groundSwitch = ADMW1001_ADC_GND_SW_CLOSED, - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, .vBiasEnable = true, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -72,28 +66,24 @@ .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 0, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 0, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = 0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = false, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -105,44 +95,36 @@ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 4499.99986449257, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_8X, - .current = { - .outputLevel = ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT, - .diodeRatio = 0, - }, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = false, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, }, }, [ADMW1001_CH_ID_DIG_I2C_0] = { - .enableChannel = false, + .enableChannel = true, .disablePublishing = false, .compensationChannel = ADMW1001_CH_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, .measurementsPerCycle = 1, - .extraSettlingTime = 15000, + .extraSettlingTime = 99.5000014663674, .i2cChannelConfig = { .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B, - .deviceAddress = 0x44, }, - }, + } }, }, }; \ No newline at end of file
diff -r 215da406282b -r 38b36e947602 multichannel_singlecycle_config.c --- a/multichannel_singlecycle_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/multichannel_singlecycle_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -42,7 +42,7 @@ #include "admw_config_types.h" ADMW_CONFIG multichannel_singlecycle_config = { - .versionId = { .major = 2, .minor = 0 }, + .versionId = { .major = 2, .minor = 0 }, .productId = ADMW_PRODUCT_ID_ADMW1001, .admw1001 = { .power = { @@ -50,18 +50,14 @@ }, .measurement = { .externalRefVoltage=0.0, + .AVDDVoltage=3.0, .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!! - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, .vBiasEnable = true, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -70,28 +66,24 @@ .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 0, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 0, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = 0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = false, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -103,28 +95,20 @@ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 4499.99986449257, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_8X, - .current = { - .outputLevel = ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT, - .diodeRatio = 0, - }, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = false, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -134,13 +118,14 @@ .enableChannel = true, .disablePublishing = false, .compensationChannel = ADMW1001_CH_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, .measurementsPerCycle = 1, - .extraSettlingTime = 15000, + .extraSettlingTime = 99.5000014663674, .i2cChannelConfig = { .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B, - .deviceAddress = 0x44, + .dataFormat.coding = ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR, }, - }, + } }, }, }; \ No newline at end of file
diff -r 215da406282b -r 38b36e947602 rtd_3w_pt100_config.c --- a/rtd_3w_pt100_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/rtd_3w_pt100_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -43,26 +43,22 @@ #include "admw_config_types.h" ADMW_CONFIG rtd_3w_pt100_config = { - .versionId = { .major = 2, .minor = 0 }, + .versionId = { .major = 2, .minor = 0 }, .productId = ADMW_PRODUCT_ID_ADMW1001, .admw1001 = { .power = { .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .externalRefVoltage =0.0, + .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!! - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, .vBiasEnable = false, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -71,30 +67,27 @@ .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 4499.99986449257, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = 0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = false, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, }, }, },
diff -r 215da406282b -r 38b36e947602 rtd_4w_config.c --- a/rtd_4w_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/rtd_4w_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -43,24 +43,22 @@ #include "admw_config_types.h" ADMW_CONFIG rtd_4w_config = { - .versionId = { .major = 2, .minor = 0 }, + .versionId = { .major = 2, .minor = 0 }, .productId = ADMW_PRODUCT_ID_ADMW1001, .admw1001 = { .power = { .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .externalRefVoltage = 0.0, - .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!! - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, + .externalRefVoltage=0.0, + .AVDDVoltage=3.0, + .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, + .vBiasEnable = false, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -69,28 +67,24 @@ .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 4499.99986449257, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = 0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -98,4 +92,4 @@ }, }, }, -}; +}; \ No newline at end of file
diff -r 215da406282b -r 38b36e947602 src/admw_1001.c --- a/src/admw_1001.c Mon Feb 24 07:04:35 2020 +0000 +++ b/src/admw_1001.c Mon Feb 24 08:49:25 2020 +0000 @@ -405,10 +405,6 @@ } return ADMW_SUCCESS; } -ADMW_RESULT admw_readMbedVersion() -{ - ADMW_LOG_INFO("Mbed Firmware version is %X.%X.%X",MBED_HOST_MAJOR,MBED_HOST_MINOR,MBED_HOST_BUILD); -} static ADMW_RESULT executeCommand( ADMW_DEVICE_HANDLE const hDevice,
diff -r 215da406282b -r 38b36e947602 thermocouple_typeJ_cjc0_config.c --- a/thermocouple_typeJ_cjc0_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/thermocouple_typeJ_cjc0_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -52,18 +52,15 @@ .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .externalRefVoltage = 0.0, + .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!! - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, + .vBiasEnable = true, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -72,28 +69,24 @@ .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 0, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 0, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = 0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -105,15 +98,12 @@ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 4499.99986449257, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_J, .gain = ADMW1001_ADC_GAIN_8X, @@ -121,7 +111,7 @@ .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -129,4 +119,4 @@ }, }, }, -}; +}; \ No newline at end of file
diff -r 215da406282b -r 38b36e947602 thermocouple_typeK_cjc0_config.c --- a/thermocouple_typeK_cjc0_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/thermocouple_typeK_cjc0_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -54,19 +54,15 @@ .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .externalRefVoltage = 0.0, + .externalRefVoltage=0.0, + .AVDDVoltage=3.0, .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, .cycleInterval = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, .vBiasEnable = true, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -74,23 +70,25 @@ .disablePublishing = false, .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, - .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, - .lowThreshold = 0, - .highThreshold = 45359.2, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 0, + .lowThreshold = -50, + .highThreshold = 250, .measurementsPerCycle = 1, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = (ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO)0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = false, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -102,28 +100,20 @@ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 0, - .priority = ADMW1001_CHANNEL_PRIORITY_0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .gain = ADMW1001_ADC_GAIN_8X, - .current = { - .outputLevel = ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT, - .diodeRatio = (ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO)0, - }, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED,
diff -r 215da406282b -r 38b36e947602 thermocouple_typeT_cjc0_config.c --- a/thermocouple_typeT_cjc0_config.c Mon Feb 24 07:04:35 2020 +0000 +++ b/thermocouple_typeT_cjc0_config.c Mon Feb 24 08:49:25 2020 +0000 @@ -49,18 +49,15 @@ .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .externalRefVoltage = 0.0, + .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!! - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 0, - .RSenseValue = 1000.0, - }, - .diagnostics = { - .disableGlobalDiag = true, - .disableMeasurementDiag = true, - .osdFrequency = 0, + .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, + .vBiasEnable = true, + .RSenseValue = 1000, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, }, .channels = { [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { @@ -69,28 +66,24 @@ .compensationChannel = ADMW1001_CH_ID_NONE, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 0, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 0, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, .gain = ADMW1001_ADC_GAIN_1X, .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .diodeRatio = 0, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, .filter = { .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -102,15 +95,12 @@ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, .lutSelect = ADMW1001_LUT_DEFAULT, .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .extraSettlingTime = 4.49999986449257, .lowThreshold = -50, .highThreshold = 250, - .offsetAdjustment = 0.0, - .gainAdjustment = 0.0, - .sensorParameter = 0.0, .measurementsPerCycle = 1, - .cycleSkipCount = 0, - .extraSettlingTime = 4499.99986449257, - .priority = 0, + .offsetAdjustment = 0, + .gainAdjustment = 1, .adcChannelConfig = { .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_T, .gain = ADMW1001_ADC_GAIN_8X, @@ -118,7 +108,7 @@ .type = ADMW1001_ADC_FILTER_SINC3, .sf = ADMW1001_SF_8P24HZ, .chopMode = ADMW1001_CHOP_MD_SW, - .notch1p2 = true, + .notch1p2 = true }, .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, @@ -126,4 +116,4 @@ }, }, }, -}; +}; \ No newline at end of file