Reads temperature from high accuracy temperature diode.
This function reads the temperature from the high-accuracy temperature diode
- Warning
- This function uses the SoC ADC to measure the temperature. This function must not be called while the ADC driver is active, or the SoC ADC is open.
-
This function uses the internal test-bus (ATEST) to measure the temperature. The test-bus must not be used when calling this function.
- Returns
- Ambient temperature in degrees Celcius
References ADC_RESOLUTION_12_BIT, ADCManualTrigger(), ADCReadResult(), ADCValueToMicrovolts(), CLKCTL_BASE, CLKCTL_CLKENCLR0_ADC0, CLKCTL_O_CLKENCLR0, CPUDelay(), enableADC(), HWREG, IntDisableMaster(), IntEnableMaster(), PMUD_BASE, PMUD_O_PREFSYS, PMUD_PREFSYS_TEST2, SYS0_ATESTCFG_VR2VA0, SYS0_ATESTCFG_VR2VA1, SYS0_BASE, SYS0_O_ATESTCFG, SYS0_O_TSENSCFG, SYS0_TSENSCFG_SEL_GND, SYS0_TSENSCFG_SEL_M, SYS0_TSENSCFG_SEL_VALUE, and voltageToTemp().