Information from temperature sensor

cancel
Showing results for 
Search instead for 
Did you mean: 

Information from temperature sensor

380 Views
Contributor II

Hi,

I should retrieve the CTAT and PTAT from the temperature sensor and then convert them through the ADC. I have read from the manual that I should use the SAR ADC B0 and work on the test channel. Could you confirm? I'm not sure and I did not find reference examples. Can I use other ADCs or compulsory the ADC B0?

thank you all


					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
Tags (1)
0 Kudos
5 Replies

1 View
NXP TechSupport
NXP TechSupport

Hi,

could you please specify the MCU you are using?

BR, Petr

0 Kudos

1 View
Contributor II

Family MPC57xx.

I am reading this AN: http://www.nxp.com/assets/documents/data/en/application-notes/AN4881.pdf

I have read that the PTAT and CTAT values must be read from the channel test and therefore exclusively by the SAR ADC B supervisor. it's correct?

0 Kudos

1 View
NXP TechSupport
NXP TechSupport

Hi,

Where have you read about PTAT and CTAT. Obviously TSENS output and ADC bandgap reference must be read on MPC57xx devices to calculate temperature later. The assignment of these internal signals to the ADC is different on each MCU. That’s why I asked for the MCU.

If you have e.g. MPC5777M then those signals are read by test channels 120 and 121 of the SARADC_B.

BR, Petr

0 Kudos

1 View
Contributor II

Yes, i have the MPC5777M.

So, to convert this two values, I have to:

- Quit power down mode and properly set up the MCR register (i do this but MSR[ADCSTATUS] remain in power down mode with 001 code, i don't understand why)

- Program the TCNCMR registers to enable channels to be converted (channel 120 and 121)

- Set NSTART bit in MCR register

- Read converted value in TCDR120 and TCDR121 registers when VALID=0

Have I forgotten any steps? I don't understand if i have to use CTR0-3 register and others like TCCAPR

0 Kudos

1 View
NXP TechSupport
NXP TechSupport

Hi Andrea,

I created simple example for TSENS usage.

See https://community.nxp.com/docs/DOC-334438.

BR, Petr

0 Kudos