
initial commit
Revision 19:09d58952b65d, committed 2019-09-09
- Comitter:
- Vkadaba
- Date:
- Mon Sep 09 05:57:43 2019 +0000
- Parent:
- 18:cbf514cce921
- Child:
- 20:f94859dd2ca0
- Commit message:
- AdSense, ADI Sense, ADISNS1000 are replaced with ADMW1001
Changed in this revision
--- a/common/utils.h Tue Aug 20 12:19:31 2019 +0000 +++ b/common/utils.h Mon Sep 09 05:57:43 2019 +0000 @@ -49,34 +49,34 @@ extern "C" { #endif -/* Utility function to print the status read from the ADI Sense device */ +/* Utility function to print the status read from the ADMW1001 device */ void utils_printStatus( ADMW_STATUS *pStatus); -/* Utility function to print data samples read from the ADI Sense device */ +/* Utility function to print data samples read from the ADMW1001 device */ void utils_printSamples( ADMW_DATA_SAMPLE *pSampleBuffer, uint32_t nNumSamples, ADMW_MEASUREMENT_MODE eMeasurementMode); -/* Utility function to register callbacks for ADI Sense device notification signals */ +/* Utility function to register callbacks for ADMW1001 device notification signals */ ADMW_RESULT utils_registerCallbacks( ADMW_DEVICE_HANDLE hDevice, volatile bool *pbDataReady, volatile bool *pbError, volatile bool *pbAlert); -/* Utility function to de-register callbacks for ADI Sense device notification signals */ +/* Utility function to de-register callbacks for ADMW1001 device notification signals */ ADMW_RESULT utils_deregisterCallbacks( ADMW_DEVICE_HANDLE hDevice); -/* Utility function to run measurements on ADI Sense device, according to its current +/* Utility function to run measurements on ADMW1001 device, according to its current * configuration, and display data samples and device status following each cycle */ ADMW_RESULT utils_runMeasurement( ADMW_DEVICE_HANDLE hDevice, ADMW_MEASUREMENT_MODE eMeasurementMode); -/* Utility function to retrieve and print the factory calibration coefficients table from the ADI Sense device */ +/* Utility function to retrieve and print the factory calibration coefficients table from the ADMW1001 device */ ADMW_RESULT utils_printCalTable( ADMW_DEVICE_HANDLE hDevice);
--- a/config.c Tue Aug 20 12:19:31 2019 +0000 +++ b/config.c Mon Sep 09 05:57:43 2019 +0000 @@ -10,7 +10,7 @@ * -Copyright (c) 2018 Analog Devices, Inc. +Copyright (c) 2019 Analog Devices, Inc.
--- a/i2c0_sensirionSHT3X_config.c Tue Aug 20 12:19:31 2019 +0000 +++ b/i2c0_sensirionSHT3X_config.c Mon Sep 09 05:57:43 2019 +0000 @@ -50,7 +50,7 @@ .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, }, .channels = {
--- a/inc/admw1001/ADMW1001_REGISTERS.h Tue Aug 20 12:19:31 2019 +0000 +++ b/inc/admw1001/ADMW1001_REGISTERS.h Mon Sep 09 05:57:43 2019 +0000 @@ -203,7 +203,7 @@ /* ============================================================================================================================ - ADISENSE1000 Core Registers + ADMW1001 Core Registers ============================================================================================================================ */ /* ============================================================================================================================
--- a/inc/admw_api.h Tue Aug 20 12:19:31 2019 +0000 +++ b/inc/admw_api.h Mon Sep 09 05:57:43 2019 +0000 @@ -227,7 +227,7 @@ * - #ADMW_INVALID_DEVICE_NUM Invalid device index specified * * @details Configure and initialise the Log interface and the SPI/GPIO - * communication interface to the ADISense module. + * communication interface to the ADMW1001 module. */ ADMW_RESULT admw_Open( unsigned const nDeviceIndex,
--- a/main.cpp Tue Aug 20 12:19:31 2019 +0000 +++ b/main.cpp Mon Sep 09 05:57:43 2019 +0000 @@ -31,40 +31,7 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * -Copyright 2017 (c) Analog Devices, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * *****************************************************************************/ /*! ****************************************************************************** @@ -93,8 +60,9 @@ extern ADMW_CONFIG multichannel_singlecycle_config; extern ADMW_CONFIG sensor2_bridge_4w_load_cell_config; extern ADMW_CONFIG config; +extern ADMW_CONFIG multichannel_thermocoupleAndHumidity; /* Change the following pointer to select any of the configurations above */ -static ADMW_CONFIG *pSelectedConfig = &sensor2_bridge_4w_load_cell_config; +static ADMW_CONFIG *pSelectedConfig = &i2c0_sensirionSHT3X_config; static ADMW_CONNECTION connectionInfo = PLATFORM_CONNECTION_INFO; @@ -108,7 +76,7 @@ bool bDeviceReady; /* - * Open an ADI Sense device instance. + * Open an ADMW1001 device instance. */ res = admw_Open(0, &connectionInfo, &hDevice); if (res != ADMW_SUCCESS) @@ -118,9 +86,9 @@ } /* - * Reset the given ADI Sense device.... + * Reset the given ADMW1001 device.... */ - ADMW_LOG_INFO("Resetting ADI Sense device, please wait..."); + ADMW_LOG_INFO("Resetting ADMW1001 device, please wait..."); res = admw_Reset(hDevice); if (res != ADMW_SUCCESS) { @@ -139,7 +107,7 @@ return res; } } while (! bDeviceReady); - ADMW_LOG_INFO("ADI Sense device ready"); + ADMW_LOG_INFO("ADMW1001 device ready"); /* * Write configuration settings to the device registers. * Settings are not applied until admw_ApplyConfigUpdates() is called.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multichannel_thermocoupleAndHumidity.c Mon Sep 09 05:57:43 2019 +0000 @@ -0,0 +1,146 @@ +/* +Copyright 2019 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/*! + ****************************************************************************** + * @file: + * @brief: + *----------------------------------------------------------------------------- + */ +#include "admw_config_types.h" + +ADMW_CONFIG multichannel_thermocoupleAndHumidity = { + .versionId = { .major = 2, .minor = 0 }, + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { + .power = { + .powerMode = ADMW1001_POWER_MODE_ACTIVE, + }, + .measurement = { + .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!! + .cycleInterval = 0, + .vBiasEnable = true, + }, + .diagnostics = { + .disableGlobalDiag = true, + .disableMeasurementDiag = true, + .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, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT, + .lowThreshold = -58, + .highThreshold = 482, + .offsetAdjustment = 0.0, + .gainAdjustment = 0.0, + .sensorParameter = 0.0, + .measurementsPerCycle = 10, + .cycleSkipCount = 0, + .extraSettlingTime = 0, + .priority = 0, + .adcChannelConfig = { + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, + .gain = ADMW1001_ADC_GAIN_1X, + .current = { + .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, + .diodeRatio = 0, + }, + .filter = { + .type = ADMW1001_ADC_FILTER_SINC3, + .sf = ADMW1001_SF_8P24HZ, + .chopMode = ADMW1001_CHOP_MD_SW, + .notch1p2 = false, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN + }, + .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + }, + }, + [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = { + .enableChannel = true, + .disablePublishing = false, + .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, + .lutSelect = ADMW1001_LUT_DEFAULT, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT, + .lowThreshold = -58, + .highThreshold = 482, + .offsetAdjustment = 0.0, + .gainAdjustment = 0.0, + .sensorParameter = 0.0, + .measurementsPerCycle = 10, + .cycleSkipCount = 0, + .extraSettlingTime = 4499.99986449257, + .priority = 0, + .adcChannelConfig = { + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, + .gain = ADMW1001_ADC_GAIN_8X, + .current = { + .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_EXTERNAL, + .diodeRatio = 0, + }, + .filter = { + .type = ADMW1001_ADC_FILTER_SINC3, + .sf = ADMW1001_SF_8P24HZ, + .chopMode = ADMW1001_CHOP_MD_SW, + .notch1p2 = false, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN + }, + .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + }, + }, + [ADMW1001_CH_ID_DIG_I2C_0] = { + .enableChannel = true, + .disablePublishing = false, + .compensationChannel = ADMW1001_CH_ID_NONE, + .measurementsPerCycle = 10, + .extraSettlingTime = 15000, + .i2cChannelConfig = { + .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B, + .deviceAddress = 0x44, + }, + }, + }, + }, +}; +
--- a/sensor0_typeK_cjc0_config.c Tue Aug 20 12:19:31 2019 +0000 +++ b/sensor0_typeK_cjc0_config.c Mon Sep 09 05:57:43 2019 +0000 @@ -53,7 +53,7 @@ .powerMode = ADMW1001_POWER_MODE_ACTIVE, }, .measurement = { - .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .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!! .cycleInterval = 0, .vBiasEnable = true, @@ -75,7 +75,7 @@ .offsetAdjustment = 0.0, .gainAdjustment = 0.0, .sensorParameter = 0.0, - .measurementsPerCycle = 1, + .measurementsPerCycle = 10, .cycleSkipCount = 0, .extraSettlingTime = 0, .priority = 0, @@ -109,7 +109,7 @@ .offsetAdjustment = 0.0, .gainAdjustment = 0.0, .sensorParameter = 0.0, - .measurementsPerCycle = 1, + .measurementsPerCycle = 10, .cycleSkipCount = 0, .extraSettlingTime = 4499.99986449257, .priority = 0,
--- a/sensor1_rtd-3w-pt100_config.c Tue Aug 20 12:19:31 2019 +0000 +++ b/sensor1_rtd-3w-pt100_config.c Mon Sep 09 05:57:43 2019 +0000 @@ -43,39 +43,58 @@ #include "admw_config_types.h" ADMW_CONFIG sensor1_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 = { - .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADMW1001_CH_ID_ANLG_2_UNIVERSAL] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADMW1001_CH_ID_NONE, - .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000, - .gain = ADMW1001_ADC_GAIN_8X, - .current = { - .outputLevel = ADMW1001_ADC_EXC_CURRENT_100uA, - }, - .filter = { - .type = ADMW1001_ADC_FILTER_SINC3, - }, - .reference = { - ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + .power = { + .powerMode = ADMW1001_POWER_MODE_ACTIVE, + }, + .measurement = { + .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!! + .cycleInterval = 0, + .vBiasEnable = false, + }, + .diagnostics = { + .disableGlobalDiag = true, + .disableMeasurementDiag = true, + .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, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .lowThreshold = -50, + .highThreshold = 250, + .offsetAdjustment = 0.0, + .gainAdjustment = 0.0, + .sensorParameter = 0.0, + .measurementsPerCycle = 1, + .cycleSkipCount = 0, + .extraSettlingTime = 4499.99986449257, + .priority = 0, + .adcChannelConfig = { + .sensor = ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, + .gain = ADMW1001_ADC_GAIN_1X, + .current = { + .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, + .diodeRatio = 0, + }, + .filter = { + .type = ADMW1001_ADC_FILTER_SINC3, + .sf = ADMW1001_SF_8P24HZ, + .chopMode = ADMW1001_CHOP_MD_SW, + .notch1p2 = false, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN + }, + .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, }, }, }, - }, }, }; -