LPC1517 temperature sensor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1517 temperature sensor

702 Views
ianbenton
Senior Contributor I

Today, I came across an LPC1517 (64 pin) which appeared fully functional, except that the temperature sensor did not work. The relevant a/d channel read randomly form 0xFFC to 0xFFF.

How can this happen?

0 Kudos
3 Replies

694 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ian,

From the Fig 43. LLS fit of the temperature sensor output voltage in data sheet of LPC15xx, we can see that the temperature sensor output voltage is about 500mV in room temperature(at 30 degree), in 12 bits ADC format, the ADC result should be 0.5*(3.3V/4095)=620 or 0x26C.

Pls check the following setting.

1)For ADC, ADCx->INSEL=0x03;

xiangjun_rong_0-1607651378372.png

2)you have to power up the on-chip temperature:

SYSCON->PDRUNCFG&=~(1<<18);

For detailed inf, pls refer to section 3.6.47 Power configuration register
The PDRUNCFG register controls the power in UM10736.pdf

 

3)this is the procedure to use ADC to sample analog channel:

31.3.1 Perform a single ADC conversion with the temperature sensor as
ADC input
To perform a single ADC conversion for ADC0 channel 0 using the temperature sensor
output:
1. Enable the temperature sensor output as input to channel 0. See Table 434.
2. Configure the system clock to be 50 MHz and select a CLKDIV value of 0 for a
sampling rate of 50 MHz using the ADC CTRL register.
3. Select the synchronous mode in the CTRL register.
4. Select ADC channel 0 to perform the conversion by setting the CHANNELS bits to
0x1 in the SEQA_CTL register.
5. Set the START bit to 1 in the SEQA_CTRL register.
6. Read the RESULT bits in the DAT0 register for the conversion result.

 

Hope it canb help you

BR

XiangJun Rong

 

 

 

 

0 Kudos

685 Views
ianbenton
Senior Contributor I

But I have three other boards where it does work. That’s what puzzled me. The fourth appears to work with the exception of the temperature sensor.

They also worked without the iref enabled in pdruncfg.

 

0 Kudos

673 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ian,

If you have 4 boards, with the same code, three of them works fine, one of them has issue, because the temperature sensor is on-chip, there is not any external connection,  It appears it is an issue of quality. I do not know how I can help you.

BR

XiangJun Rong

Tags (1)
0 Kudos