芯片规格书中的描述:
In order to improve the accuracy of the temperature sensor in the 25º to 125ºC range, every device has several unique temperature code values pre-written to the FRAM to specify more-accurate gain and offset values. A signed, 32-bit value for the 25ºC temperature point of this device is located at FRAM address 0x3FFC, and a 32-bit 125ºC temperature point is located at FRAM address 0x3FF4.
With these two temperature code values, the appropriate gain for this range can determined as GAIN = (CODE_125C – CODE_25C) / 100
where
• CODE_125C is the 32-bit FRAM value at 0x3FF4
• CODE_25C is the 32-bit FRAM value at 0x3FFC
From there, the temperature in degrees Celcius can be determined using
T = 25 + (ADC_CODE_READ – CODE_25C) / GAIN
where
• ADC_CODE_READ is the internal temperature ADC reading from S3
根据规格书的说明我读出CODE_25C的值是1921772
CODE_125C的值是2475847
ADC_CODE_READ的值是387229
这样计算的T=-251.9摄氏度,明显是不正常的,用的是内部温度传感器,PTAT增益是1V/V,我不知道该怎么得到准确的温度值?