1 /*
2  * Author: Jon Trulson <jtrulson@ics.com>
3  * Copyright (c) 2015 Intel Corporation.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 // This table was taken from the '538RT_table.pdf' datasheet. It maps
26 // resistance values to ambient temperatures starting at -20C and
27 // going up to 200C in increments of 1C
28 
29 static const int otp538u_rt_table_max = 121;
30 
31 static int otp538u_rt_table[otp538u_rt_table_max] = {
32   919730, 869299, 821942, 777454, 735644, 696336, 659365, 624578, 591834,
33   561002, 531958, 504588, 478788, 454457, 431504, 409843, 389394, 370082,
34   351839, 334598, 318300, 302903, 288329, 274533, 261471, 249100, 237381,
35   226276, 215750, 205768, 196300, 187316, 178788, 170691, 163002, 155700,
36   148766, 142183, 135936, 130012, 124400, 119038, 113928, 109059, 104420,
37   100000, 95788, 91775, 87950, 84305, 80830, 77517, 74357, 71342, 68466,
38   65720, 63098, 60595, 58202, 55916, 53730, 51645, 49652, 47746, 45924,
39   44180, 42511, 40912, 39380, 37910, 36500, 35155, 33866, 32631, 31446,
40   30311, 29222, 28177, 27175, 26213, 25290, 24403, 23554, 22738, 21955,
41   21202, 20479, 19783, 19115, 18472, 17854, 17260, 16688, 16138, 15608,
42   15098, 14608, 14135, 13680, 13242, 12819, 12412, 12020, 11642, 11278,
43   10926, 10587, 10260, 9945, 9641, 9347, 9063, 8789, 8525, 8270, 8023,
44   7785, 7555, 7333, 7118, 6911
45 };
46 
47