How sensitive is the S12ZVC on-chip temperature ?

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

How sensitive is the S12ZVC on-chip temperature ?

1,428 Views
mahtabsarwar
Contributor II

Hi,

 

I am using PE to set the ADC to measure temperature with the on-chip VREG temp sensor:

 

158229_158229.PNGtemp sensor PE setup.PNG

 

And I can switch the CPMUHTCTL register between the band-gap voltage and temperature to get a calibration point for the conversion calculation: CPMUHTCTL_HTE = 1, CPMUHTCTL_VSEL = 1 for bandagap voltage; CPMUHTCTL_HTE = 1, CPMUHTCTL_VSEL = 0 for sensor voltage.

 

My problem is that the sensor voltage ADC reading doesn't vary over temperature. I have tested it over a range of +- 10 degrees and always get exactly the same ADC reading, to the last bit. The ADC value is quite different from the ADC value with the bandgap voltage set, so I know I'm not still measuring the constant bandgap voltage. I'm using the GetChanValue16 method to read the ADC after calling the Measure method.

 

Is there anything I've missed, because as I understand from all the various references, there is a sensitivity of about 1.75 mv / degree C, which should make the ADC value change over the temp range I'm testing it at ?

Labels (1)
0 Kudos
4 Replies

780 Views
mahtabsarwar
Contributor II

Just to add, I am using the S12ZVC demo board..I know the ADC is connected to something on the demo board but because the temp sensor is internally routed in the chip I assumed external settings are irrelevant..

0 Kudos

780 Views
RadekS
NXP Employee
NXP Employee

Hi Mahtab,

Unfortunately, currently, I don’t have here VLG-S12ZVC board for testing.

Some basic S12Z ADC example code (no PE) could be downloaded here:

https://community.nxp.com/docs/DOC-332384

In fact, the external settings are not irrelevant. You configured ADC to use VRH_0/VRL_0 signals as the reference. According to RM: ”ADC reference Voltage signal VRH_1 is mapped to VDDA and VRH_0 is mapped to PAD3. VRL_1 is mapped to VSSA and VRL_0 is mapped to VSSA.”

So, if you didn’t connect any external reference voltage to PAD3 pin, please use VRH_1/VRL_1 signals as the reference.

The Temperature Sensor Slope should be around 5.25mV/°C. See Table E-1. Voltage Regulator Electrical Characteristics (Junction Temperature From –40°C To +175°C) in RM.

In fact, there is also second temperature sensor directly as part of ADC module.

Some more details about this temperature sensor you could get from our application note AN3624 S12X Temperature Sensor

http://www.nxp.com/files/microcontrollers/doc/app_note/AN3624.pdf

The calibration methods are nicely described in AN3031 Temperature Sensor for the HCS08 Microcontroller Family

http://www.nxp.com/files/microcontrollers/doc/app_note/AN3031.pdf

I hope it helps you.

Have a great day,
Radek

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

780 Views
mahtabsarwar
Contributor II

Hi Radek,

I came back to this after testing properly and calibrating with some known temperatures. You are right, using VRH_0/ VRL_0 isn't correct and gives a wrong reading. Thanks !

0 Kudos

780 Views
basilmathew
Contributor III

Hello ,

Could you find a fix for your reading internal temp sensor value ? I am getting a 275 and the value is not changing !!

Regrds,

Basil

0 Kudos