ADC temperature and test reading

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

ADC temperature and test reading

Jump to solution
2,527 Views
stefano-quantic
Contributor III

On iMXRT1176, there are auxiliary channels for ADC conversion, besides the normal ones (for external signals routed to physical pins).
The reference manual hints that among these channels is a temperature sensor, but it doesn't list which channels are associated with it (nor with other auxiliary signals). Nor does it specify how to convert from the raw ADC value to a temperature in Celsius degrees.
The datasheet has no information about it either.
However, in the Config Tools I can choose these auxiliary signals:
* Analog test bus 0: ADC2, CH7A
* Analog test bus 1: ADC1, CH6B
* Temperature sensor minus: ADC1, CH7A
* Temperature sensor plus: ADC1, CH7B
Which also means that I can read the two temperature sensor signals in differential mode.

So:
1) How should I convert the raw data to Celsius degrees?
2) Should I read the differential temperature sensor, to get a sensible, absolute temperature reading?
3) What are the two analog test bus signals?

0 Kudos
Reply
1 Solution
2,392 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @stefano-quantic ,

  Please ignore the ADC channel for temp, as the RT1170 can't support it, that's why it is removed from the new RM version.

  Please use the TMPSNS peripheral.

 

Best Regards,

Kerry

View solution in original post

0 Kudos
Reply
9 Replies
2,404 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @stefano-quantic ,

   I already get the information.

  RT1170 internal temp sensor is not connect to the ADC module, it is the indepent IP module:

kerryzhou_0-1689832728650.png

It also have the formula which can get the temp  Celsius degrees, please refer to the SDK code:

SDK_2_13_10_MIMXRT1170-EVK\boards\evkmimxrt1170\driver_examples\tempsensor\cm7

Wish it helps you!

Best Regards,

Kerry

 

 

0 Kudos
Reply
2,396 Views
stefano-quantic
Contributor III

Ok, so the ADC temperature sensor channel is completely independent of the TMPSNS peripheral.
The formula for TMPSNS is clear. However, can I apply this same formula for the ADC reading of the temperature?
Or, would you suggest just ignoring the ADC temperature channel, and reading the temperature using the TMPSNS peripheral?

0 Kudos
Reply
2,393 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @stefano-quantic ,

  Please ignore the ADC channel for temp, as the RT1170 can't support it, that's why it is removed from the new RM version.

  Please use the TMPSNS peripheral.

 

Best Regards,

Kerry

0 Kudos
Reply
2,501 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @stefano-quantic ,

  You can see the temperature channel in the RT1170RM:

kerryzhou_0-1689320715965.png

About the raw ADC value to a temperature in Celsius degrees., normally, you can use the real test result to check it,

eg, 20 degree->ADC data

30 degree->ADC data

...

then you can use draw the wave and calculate the formula, you can use that formula in the code and get the real ADC data related temp.

This is my own experience when I design my own project.

1) How should I convert the raw data to Celsius degrees?

=>Answer:  test, get formula, then put to code to calculate it.

It is determined by your own algorithm.


2) Should I read the differential temperature sensor, to get a sensible, absolute temperature reading?

=>Answer: To RT1170 chip IP, no, it just give you the temp ADC data, no directly temperature .


3) What are the two analog test bus signals?

=>Answer: should be the internal test pin, no detail description about it, you can ignore it.

 

Wish it helps you!

Best Regards,

kerry

0 Kudos
Reply
2,494 Views
stefano-quantic
Contributor III

Hello,
thanks for the information.

I see that the reference manual (rev1) has the information about the temperature sensor channels, as in your image.
Unfortunately, I was looking at rev2 of the reference manual, where that information has disappeared.

About the temperature formula: I saw in the datasheet (IMXRT1170IEC rev4, §4.8.4) that the temperature sensor range is [-40, 125]°C. I assume that this temperature sensor (used by the TEMPSENSOR peripheral for generating interrupts) is the same as the one I can read through the ADC.
Applying this conversion (i.e. mapping [0, 4096] to [-40, 125]°C), I get sensible results, at ~25°C.
I got them by differential reading (plus - minus, i.e. CH7B - CH7A). By single-ended reading, I get very low values, which are meaningless, I guess.

Does this [0, 4096] to [-40, 125]°C mapping sound right to you?

 

I can't test it much farther away from room temperature, and I don't have many MCU samples now for extensive testing (also considering that the stated accuracy is +-5°C / +-10°C, so I'd need more than a few devices to get valid results).
Having a "typical" formula in the datasheet/manual would be most welcome, rather than having every customer figure it out by testing and (probably wrong) guesswork.

 

Best regards

0 Kudos
Reply
2,490 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @stefano-quantic ,

   What's the board and the chip partnumber you are testing now?

  I will help you to check the details.

 

Best Regards,

Kerry

0 Kudos
Reply
2,482 Views
stefano-quantic
Contributor III

iMXRT1176CVM8A on Embedded Artists' iMXRT1176 uCOM module

0 Kudos
Reply
2,417 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @stefano-quantic ,

  So sorry for my later reply because of the nxp web login issues these days.

   Please also check your ADC reference voltage, what's the reference voltage now. As I don't have your mentioned board, and it's schematic, please help to check yoru schematic.

   About the RM rev2 remove the temp connection situation, I find the doc update log also didn't mention it, I will check it internally, then give you reply.

   Please keep patient, thanks.

 

Best Regards,

Kerry

0 Kudos
Reply
2,398 Views
stefano-quantic
Contributor III

Hi Kerry,

no problem about the delay.

 

The ADC_VREFH pin is at 1.8V (the same as VDDA_ADC_1P8)

0 Kudos
Reply