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?
Solved! Go to Solution.
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
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:
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
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?
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
Hi @stefano-quantic ,
You can see the temperature channel in the RT1170RM:
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
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
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
iMXRT1176CVM8A on Embedded Artists' iMXRT1176 uCOM module
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
Hi Kerry,
no problem about the delay.
The ADC_VREFH pin is at 1.8V (the same as VDDA_ADC_1P8)