Temperature sensor in SAMD51

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi.

In SAMD51 datasheet , under system peripherals sections  , it is mentioned like  one temperature sensor . If SAMD51 includes temperature sensor how can i use it to display the temperature status?

 

 could anyone explain me on this?

Karthi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Read the ADC section. The temperature sensor is an input to the ADC

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yeah. i got it.

 

As per datasheet,

 

The output voltages from the sensors, VTP and
VTC, can be sampled by the ADC.

what is VTP and VTC voltages?

is it possible to access these sensors for getting the temperature of SAM controller?

Karthi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes by getting the voltages from the sensors using the ADC you can compute the temperature. But you are quoting from the section where this is described  so I don't understand the question.

/Lars

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your reply.

 

My goal is  to implement a software command for getting temperature status of SAMD51.

now its clear that by selecting internal reference and temperature sensor enable bit we can read temp value. 

 

 

Since VREF.TSEN is hardware register bit, can i access it directly through my software?

 i need  help to access sensor and get temperature value through software?

Karthi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

We have configured the MUXPOS field (0x1C)  as per the samd51 data sheet section 45.8.4 Input Control for selecting the temperature sensor. But the AD conversion is not successful.How can we verify the temperature sensor output using AD channels.

 

Kindly anyone provide your input on this.

 

Thanks,

Karthi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

We have read the temperature from PTAT and CTAT channels of sensor and calculated the Tc ,Tp values. We read the calibration parameters from NVM region which are needed for calculation. And calculated the temperature value using the formula given in "45.6.3.1 Device Temperature Measurement" section. After calculation we read the temperature value varying between 45 to 53 degree Celsius for each read.

 

And we have changed the ADC instance 0 (ADC0) to ADC instance 1(ADC1) in the code. 

 

For example, 

hri_adc_write_INPUTCTRL_reg(ADC1,0x181D); 
hri_adc_write_AVGCTRL_SAMPLENUM_bf(ADC1, 0x00); 

 

we have tested the operation and getting the temperature result in the range between 16 to 32 degree Celsius.  

 

Please check our observations and provide your inputs.

 

Thanks,

 

But when we are measuring the micro controller temperature with digital thermometer it is showing the temperature value in between 24 to 29 degree Celsius. 

Karthi