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
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?
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.
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