How stable, that is, how repeatable, is the MSP43 internal temperature sensor?
I'm getting some unexpectedly high readings from the internal temperature sensor on my chip via ADC10. Since I don't _really_ think my chip is occasionally running hotter than boiling water (144degC??!!), I thought I'd ask for some advice.
I have code running on a LaunchPad/'G2231 that does three things:
1) Blinks an LED with a "220" ohm resistor on P1.4,
2) Monitors/debounces the LP S2 button, and
3) Samples the internal temperature sensor (ADC10 channel 1010b).
The LED is driven with a "manually-generated" PWM signal timed by Timer_A0 (4000 interrupts/sec). The pulse rate is 2 Hz -- 2000 Timer_A ticks -- and initially the PWM "ON" period is 10 Timer_A ticks, for a 10/2000 or 0.5% duty cycle.
Each time S2 is pressed, the ON period is increased by 10 more ticks.
Meanwhile, in the background, ADC10 is sampling the internal temperature sensor watching for signs of heating up, that is, an ADC10(1.5Vref) value of 757, which ought to represent 35degC. If this happens, it shuts off the external LED and turns on LP LED2 (green) to signal a problem.
So far, so good. One might assume that a "too hot" condition would never be achieved, since the chip is only powering itself, Timer_A0, ADC10, and the external LED.
And so it seems... Running under 'mspdebug' and periodically stopping to check the ON tick counts and current temperature, I gradually increase the pulse width to 200 (of 2000) ticks and all is well: the LED flash is _slightly_ longer, and the internal temperature stays in the range 0x02d6-0x02da (726-730, or 22-24degC).
Then, somewhere between 250 ticks and 500 ticks, Something Happens: ADC10 unexpectedly reports a value exceeding not just the 757 "trip point" but well above it, in several cases reporting values of 0x3ff (144degC).
I scanned the E2E postings and found several reports of an internal temperature sensor reporting higher-than-expected values, but none quite _this_ extreme.
Assuming that this isn't simply some kind of coding or setup error (perhaps a large assumption <grin!>), that leaves -- what? -- the sensor, the ADC, and the internal 1.5V reference.
Can anyone offer any suggestions as to why I might be seeing this effect?
A few details:
The chip is a 'G2231.
The LP Vcc is 3.57V. When the LED+R is connected between Vcc and Gnd, the voltage drop across R (measured at 218 ohms) is 0.69V, indicating a current of about 3.2mA, well within the pin's spec.
Timer_A:
TACCR0: 0x00f9 "250"
TACTL: 0x0210 TASSEL_2|ID_0|MC_1
TACCTL0: 0x0010 OUTMOD_0|CCIE
ADC10:
ADC10CTL0: 0x38b8 SREF_1|SHT_3|MSC|REFON|ADC10ON|ADC10IE
ADC10CTL1: 0xa07c INCH_10|SHS_0|ADC10DIV_3|ADC10SSEL_3|CONSEQ_2
ADC10AE0: not used
Frank McKenney
--
It has often been said that we have but one life to live; that is
nonsense. If one reads fiction he or she can live a thousand
lives, in many parts of the world or in outer space. One can
cross a desert, climb the Himalayas, or experience the agony of
defeat, the triumph of victory, the pangs of starvation, or the
choking thirst of the desert, all while safely at home.
-- Louis L'Amour / The Sackett Companion
--



