This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1231E6PM: internal temp sensor influenced by PE3?

Part Number: TM4C1231E6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Hi,

one of my customers wants to estimate the ambient temperature using the internal temp channel of the ADC. We are aware that the accuracy is specified with +/-5°C.

When measuring the temp sensor, we get a reading that is within this accuracy specification. We need guidance on the influence of the PE3 pin on the temp sensor reading. When the voltage of this pin changes, the reading is immediately influenced. We couldn't find any description of this behaviour nor any errata that seems to cover this.

Just to be sure that this behavior is not related to customer's application, I put together a example project running on our EK-TM4C123GXL. Please find this project attached (using Tivaware 2.1.4.178)TM4C123GH6_temp_sensor.zip. I tried with both PE3 enabled as well as disabled. To vary the voltage at PE3, I connected a jump wire between this pin and either +3.3V or GND. Result of the measurements:

As you can see, the reading is lower when PE3 is connected to GND and increases when PE3 is connected to +3.3V.

What is the reason for this behavior? How to avoid it?

Best regards,
Phil

  • May we confirm that client & you are aware that the MCU's internal junction (source of that temperature measurement) is sensitive to:

    • the code load & number of peripherals - enabled & operating
    • MCU's operating frequency
    • combined power dissipation of each/every GPIO actively outputting 
    • the temperature of the board's surrounding ambient

    As such - client's idea of employing the MCU's junction as a, "fair/proper" means to measure & monitor "ambient" may prove sub-optimal.

    Low cost thermistor - placed away from (potentially) heating elements of the pcb - will provide a FAR more realistic measure of "ambient."

    The "PE_3" effect you note seems (bit) out-weighed by the facts herein presented...

  • I am able to reproduce the problem you describe. I am asking the design team to look into this. At first glance it seems to be that analog channel 0 is biasing the sample capacitor of the ADC and since the internal temperature sensor has a high source resistance, the voltage on pin PE3 affects the results. The only workaround I saw was to leave PE3 open (not connected). I was surprised that slowing the ADC clock to ADC_CLOCK_RATE_EIGHTH did not help.

    (Update 4-May-2017: A better workaround is to convert twice in the same sequence. See later post.)

  • May I note that multiple (other) ARM MCU vendors provide similar "internal temperature reporting" and few (i.e. none) consider that reporting "proper" for the measure of "ambient" (surrounding) temperature!

    ONLY during the (very brief) power-up/start-up (from cold/ambient) will the MCU's internal junction report (near) ambient temperature.    

    The intention of such internal MCU temperature reporting - instead - is to monitor the MCU's critical junction temperature - "not" the surrounding ambient!

    As the non/(sub)-standard (desire to employ the internal temp. sensor - to measure "ambient") - persists - it is wise to present that sensor's, "Controlling Technical Authority:"    (this modeled upon past candidate Gore's, "Controlling Legal Authority...") 

    13.3.6 Internal Temperature Sensor (this a true copy from the TM4C123 MCU Manual - which well matches o.p.'s temp. sensor device)
    The temperature sensor serves two primary purposes: 1) to notify the system that internal temperature is too high or low for reliable operation and 2) to provide temperature measurements for calibration of the Hibernate module RTC trim value.

    This "Sensor Output versus temperature graph" (same source as above) leaves "No doubt" that "ambient" temperature is not the target of this internal, MCU sensor.    While the lower temperatures (are) very likely to be, "ambient, thermal chamber, or focused air-flow" induced - most all "higher temperatures" (say - above 35°C) (more) reflect the combination of MCU activity, power dissipation & number of "active" MCU peripherals - with "ambient" temperature being (only) a base-line (starting!) contributor to the MCU's reported junction temperature - once the MCU has been "up/running!"

    (Few vendor venues - either Dallas or Austin - are likely to "flirt with" 85°C AMBIENT - even in summer!)    

    Employing the MCU's junction temperature to measure "ambient" - other than (very briefly) and from a "cold Start-Up" - is (outside) best practice!

  • The internal temperature sensor has a high source impedance. The voltage on AN0 (PE3) has a significant impact on the conversion result due to charge sharing of the sample capacitor if the temperature sensor is the first channel in the sequence. If the temperature sensor is not the first channel converted in the sequence, then the channel previous to the temperature sensor has a similar impact. The most accurate workaround that I see so far is to convert the temperature sensor twice as two consecutive steps in the same sequence and discard the first conversion.

  • After reading a few posts on the subject and dealing with the Tiva temperature sensors for a few years, my personal conclusions their few possible applications:
    - Test ADC code
    - Implement an overheat alarm to set some flag when the internal temperature goes above something extreme like 60oC.
    Zero hope for ambient temperature measurement, period.
  • Bruno,

    Thank you for emphasizing that point. The temperature sensor can only measure the junction temperature of the silicon. That temperature is a function of the power dissipation of the device, the thermal dissipation of the circuit board (which is a function of board design and air flow), the power dissipation of other devices on the board and finally the ambient temperature.

  • cb1_mobile said:
    As such - client's idea of employing the MCU's junction as a, "fair/proper" means to measure & monitor "ambient" may prove sub-optimal.

    Quote above appeared very early - this thread - yet (only now) is (finally) acknowledged.

    But for, "Start-Up from cold" - MCU's (or other device's) Junction Temperature has "Less than STELLAR" relationship to the surrounding ambient!

    It is (that) "ambient temperature estimation" which vendor poster sought - yet by a very inefficient means/method!

    May I thank you both for "repeating" the point made long ago?