Internal Temperature Sensor Channels - Analog Devices ADuCM355 Hardware Reference Manual

Hide thumbs Also See for ADuCM355:
Table of Contents

Advertisement

UG-1262

INTERNAL TEMPERATURE SENSOR CHANNELS

The
ADuCM355
analog die contains two internal temperature sensor channels.
Temperature Sensor 0
The temperature sensor outputs a voltage proportional to die temperature. This voltage is linear relative to temperature. This internal
channel is measured via the ADC by selecting the temperature sensor channels as the positive and negative inputs from the mux. The die
temperature is calculated by the following:
(TEMPSENSDAT0/(PGA Gain × K)) − 273.15
where K = 8.13.
For improved accuracy, configure the temperature sensor in chop mode via TEMPCON0, Bits[3:1]. If chopping is selected, the user must
ensure an even number of ADC conversions take place on the temperature sensor channel and that these results are averaged.
Dedicated calibration registers for the temperature sensor channel are also available. When the ADC selects the temperature sensor as
the positive input, the calibration values in the ADCOFFSETTEMPSENS0 and ADCGAINTEMPSENS0 registers are automatically used.
To enable the internal temperature sensor, set AFECON, Bit 12 = 1. Select ADC input channels as follows:
ADCCON, Bits[12:8] = 01011 to select the ADC negative input channel.
ADCCON, Bits[5:0] = 001011 to select the positive input channel.
To start an ADC conversion of the temperature sensor channel, set AFECON, Bit 13 and AFECON, Bit 8 to 1. For optimal temperature
sensor results, enable chop mode of the temperature sensor with the 6.25 kHz chopping frequency. Then, average an even number of
ADC temperature sensor results to eliminate any inaccuracies due to the chopping clock.
The following code snippets demonstrate how to set up and use the Temperature Sensor 0:
void InitAfeADC(void)
{
AfeAdcPwrUp(BITM_AFE_AFECON_ADCEN);
AfeAdcCfg(GNPGA_1_5, 0);
AfeAdcChan(MUXSELP_TEMP,MUXSELN_TEMPN);
AfeAdcIntCfg(
BITM_AFE_ADCINTIEN_ADCRDYIEN| // Select ADCReady and Temp sensor channels as
interrupt sources
BITM_AFE_ADCINTIEN_TEMPRDYIEN);
pADI_AFE->AFECON |=
BITM_AFE_AFECON_TEMPSENSEN0;
pADI_AFE-> TEMPCON0 = 0x2;
6.25kHz chop clock
pADI_AFE->REPEATADCCNV = 0x11;
NVIC_EnableIRQ(AFE_ADC_IRQn);
}
// ADC Interrupt handler
void AfeAdc_Int_Handler()
{
uiIntSta = AfeAdcIntSta();
if (uiIntSta & BITM_AFE_ADCINTSTA_ADCRDY)
{
}
if (uiIntSta & BITM_AFE_ADCINTSTA_TEMPRDY) // Check for Temp sensor flag
{
TEMP_RESULT= AfeAdcRd(TEMPSENSOR);
pADI_AFE->ADCINTSTA |=
ADuCM355
// power up the ADC
// Configure ADC to measure Temp. output
// Select Temp sensor inputs to the ADC
// Enable the ADC temp sensor channel
// Turn on Temp sensor chopping with
// Enable AFE_ADC interrupt source in NVIC
Rev. B | Page 62 of 312
Hardware Reference Manual
(2)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADuCM355 and is the answer not in the manual?

Table of Contents