The example demonstrates how to use the temperature sensor feature inside the microcontroller. The RAW data of temperature sampled by AFEC is taken by XDMAC and converted to temperature value ,which is output to terminal console. Three columns will be output to console, first column is AFEC channel,for temperature sensor on SAMV71/SAME70,it's channel 11, the second column is RAW data sampled, the third column is converted temperature value.
This example can be used on SAMV71-Xplained-Ultra/SAME70-Xplained-Pro board.
The example is aimed to demonstrate the temperature sensor feature inside the device and get temperature by XDMAC. To use this feature, the temperature sensor should be automatically turned on by RTC event. The channel 11 is connected to the sensor by default. If set RTCT = 1, TRGEN is disabled and all channels are disabled (AFE_CHSR = 0), then only channel 11 is converted at a rate of 1 conversion per second.
The temperature sensor provides an output voltage (VT) that is proportional to absolute temperature (PTAT). The relationship between measured voltage and actual temperature could be found in Electrical Characteristics part of the datasheet.