1 /****************************************************************************** 2 * Filename: hw_aon_batmon_h 3 * Revised: 2018-05-14 12:24:52 +0200 (Mon, 14 May 2018) 4 * Revision: 51990 5 * 6 * Copyright (c) 2015 - 2017, Texas Instruments Incorporated 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * 1) Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * 2) Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 ******************************************************************************/ 36 37 #ifndef __HW_AON_BATMON_H__ 38 #define __HW_AON_BATMON_H__ 39 40 //***************************************************************************** 41 // 42 // This section defines the register offsets of 43 // AON_BATMON component 44 // 45 //***************************************************************************** 46 // Internal 47 #define AON_BATMON_O_CTL 0x00000000 48 49 // Internal 50 #define AON_BATMON_O_MEASCFG 0x00000004 51 52 // Internal 53 #define AON_BATMON_O_TEMPP0 0x0000000C 54 55 // Internal 56 #define AON_BATMON_O_TEMPP1 0x00000010 57 58 // Internal 59 #define AON_BATMON_O_TEMPP2 0x00000014 60 61 // Internal 62 #define AON_BATMON_O_BATMONP0 0x00000018 63 64 // Internal 65 #define AON_BATMON_O_BATMONP1 0x0000001C 66 67 // Internal 68 #define AON_BATMON_O_IOSTRP0 0x00000020 69 70 // Internal 71 #define AON_BATMON_O_FLASHPUMPP0 0x00000024 72 73 // Last Measured Battery Voltage 74 #define AON_BATMON_O_BAT 0x00000028 75 76 // Battery Update 77 #define AON_BATMON_O_BATUPD 0x0000002C 78 79 // Temperature 80 #define AON_BATMON_O_TEMP 0x00000030 81 82 // Temperature Update 83 #define AON_BATMON_O_TEMPUPD 0x00000034 84 85 // Event Mask 86 #define AON_BATMON_O_EVENTMASK 0x00000048 87 88 // Event 89 #define AON_BATMON_O_EVENT 0x0000004C 90 91 // Battery Upper Limit 92 #define AON_BATMON_O_BATTUL 0x00000050 93 94 // Battery Lower Limit 95 #define AON_BATMON_O_BATTLL 0x00000054 96 97 // Temperature Upper Limit 98 #define AON_BATMON_O_TEMPUL 0x00000058 99 100 // Temperature Lower Limit 101 #define AON_BATMON_O_TEMPLL 0x0000005C 102 103 //***************************************************************************** 104 // 105 // Register: AON_BATMON_O_CTL 106 // 107 //***************************************************************************** 108 // Field: [1] CALC_EN 109 // 110 // Internal. Only to be used through TI provided API. 111 #define AON_BATMON_CTL_CALC_EN 0x00000002 112 #define AON_BATMON_CTL_CALC_EN_BITN 1 113 #define AON_BATMON_CTL_CALC_EN_M 0x00000002 114 #define AON_BATMON_CTL_CALC_EN_S 1 115 116 // Field: [0] MEAS_EN 117 // 118 // Internal. Only to be used through TI provided API. 119 #define AON_BATMON_CTL_MEAS_EN 0x00000001 120 #define AON_BATMON_CTL_MEAS_EN_BITN 0 121 #define AON_BATMON_CTL_MEAS_EN_M 0x00000001 122 #define AON_BATMON_CTL_MEAS_EN_S 0 123 124 //***************************************************************************** 125 // 126 // Register: AON_BATMON_O_MEASCFG 127 // 128 //***************************************************************************** 129 // Field: [1:0] PER 130 // 131 // Internal. Only to be used through TI provided API. 132 // ENUMs: 133 // 32CYC Internal. Only to be used through TI provided API. 134 // 16CYC Internal. Only to be used through TI provided API. 135 // 8CYC Internal. Only to be used through TI provided API. 136 // CONT Internal. Only to be used through TI provided API. 137 #define AON_BATMON_MEASCFG_PER_W 2 138 #define AON_BATMON_MEASCFG_PER_M 0x00000003 139 #define AON_BATMON_MEASCFG_PER_S 0 140 #define AON_BATMON_MEASCFG_PER_32CYC 0x00000003 141 #define AON_BATMON_MEASCFG_PER_16CYC 0x00000002 142 #define AON_BATMON_MEASCFG_PER_8CYC 0x00000001 143 #define AON_BATMON_MEASCFG_PER_CONT 0x00000000 144 145 //***************************************************************************** 146 // 147 // Register: AON_BATMON_O_TEMPP0 148 // 149 //***************************************************************************** 150 // Field: [7:0] CFG 151 // 152 // Internal. Only to be used through TI provided API. 153 #define AON_BATMON_TEMPP0_CFG_W 8 154 #define AON_BATMON_TEMPP0_CFG_M 0x000000FF 155 #define AON_BATMON_TEMPP0_CFG_S 0 156 157 //***************************************************************************** 158 // 159 // Register: AON_BATMON_O_TEMPP1 160 // 161 //***************************************************************************** 162 // Field: [5:0] CFG 163 // 164 // Internal. Only to be used through TI provided API. 165 #define AON_BATMON_TEMPP1_CFG_W 6 166 #define AON_BATMON_TEMPP1_CFG_M 0x0000003F 167 #define AON_BATMON_TEMPP1_CFG_S 0 168 169 //***************************************************************************** 170 // 171 // Register: AON_BATMON_O_TEMPP2 172 // 173 //***************************************************************************** 174 // Field: [4:0] CFG 175 // 176 // Internal. Only to be used through TI provided API. 177 #define AON_BATMON_TEMPP2_CFG_W 5 178 #define AON_BATMON_TEMPP2_CFG_M 0x0000001F 179 #define AON_BATMON_TEMPP2_CFG_S 0 180 181 //***************************************************************************** 182 // 183 // Register: AON_BATMON_O_BATMONP0 184 // 185 //***************************************************************************** 186 // Field: [6:0] CFG 187 // 188 // Internal. Only to be used through TI provided API. 189 #define AON_BATMON_BATMONP0_CFG_W 7 190 #define AON_BATMON_BATMONP0_CFG_M 0x0000007F 191 #define AON_BATMON_BATMONP0_CFG_S 0 192 193 //***************************************************************************** 194 // 195 // Register: AON_BATMON_O_BATMONP1 196 // 197 //***************************************************************************** 198 // Field: [5:0] CFG 199 // 200 // Internal. Only to be used through TI provided API. 201 #define AON_BATMON_BATMONP1_CFG_W 6 202 #define AON_BATMON_BATMONP1_CFG_M 0x0000003F 203 #define AON_BATMON_BATMONP1_CFG_S 0 204 205 //***************************************************************************** 206 // 207 // Register: AON_BATMON_O_IOSTRP0 208 // 209 //***************************************************************************** 210 // Field: [5:4] CFG2 211 // 212 // Internal. Only to be used through TI provided API. 213 #define AON_BATMON_IOSTRP0_CFG2_W 2 214 #define AON_BATMON_IOSTRP0_CFG2_M 0x00000030 215 #define AON_BATMON_IOSTRP0_CFG2_S 4 216 217 // Field: [3:0] CFG1 218 // 219 // Internal. Only to be used through TI provided API. 220 #define AON_BATMON_IOSTRP0_CFG1_W 4 221 #define AON_BATMON_IOSTRP0_CFG1_M 0x0000000F 222 #define AON_BATMON_IOSTRP0_CFG1_S 0 223 224 //***************************************************************************** 225 // 226 // Register: AON_BATMON_O_FLASHPUMPP0 227 // 228 //***************************************************************************** 229 // Field: [9] DIS_NOISE_FILTER 230 // 231 // Internal. Only to be used through TI provided API. 232 #define AON_BATMON_FLASHPUMPP0_DIS_NOISE_FILTER 0x00000200 233 #define AON_BATMON_FLASHPUMPP0_DIS_NOISE_FILTER_BITN 9 234 #define AON_BATMON_FLASHPUMPP0_DIS_NOISE_FILTER_M 0x00000200 235 #define AON_BATMON_FLASHPUMPP0_DIS_NOISE_FILTER_S 9 236 237 // Field: [8] FALLB 238 // 239 // Internal. Only to be used through TI provided API. 240 #define AON_BATMON_FLASHPUMPP0_FALLB 0x00000100 241 #define AON_BATMON_FLASHPUMPP0_FALLB_BITN 8 242 #define AON_BATMON_FLASHPUMPP0_FALLB_M 0x00000100 243 #define AON_BATMON_FLASHPUMPP0_FALLB_S 8 244 245 // Field: [7:6] HIGHLIM 246 // 247 // Internal. Only to be used through TI provided API. 248 #define AON_BATMON_FLASHPUMPP0_HIGHLIM_W 2 249 #define AON_BATMON_FLASHPUMPP0_HIGHLIM_M 0x000000C0 250 #define AON_BATMON_FLASHPUMPP0_HIGHLIM_S 6 251 252 // Field: [5] LOWLIM 253 // 254 // Internal. Only to be used through TI provided API. 255 #define AON_BATMON_FLASHPUMPP0_LOWLIM 0x00000020 256 #define AON_BATMON_FLASHPUMPP0_LOWLIM_BITN 5 257 #define AON_BATMON_FLASHPUMPP0_LOWLIM_M 0x00000020 258 #define AON_BATMON_FLASHPUMPP0_LOWLIM_S 5 259 260 // Field: [4] OVR 261 // 262 // Internal. Only to be used through TI provided API. 263 #define AON_BATMON_FLASHPUMPP0_OVR 0x00000010 264 #define AON_BATMON_FLASHPUMPP0_OVR_BITN 4 265 #define AON_BATMON_FLASHPUMPP0_OVR_M 0x00000010 266 #define AON_BATMON_FLASHPUMPP0_OVR_S 4 267 268 // Field: [3:0] CFG 269 // 270 // Internal. Only to be used through TI provided API. 271 #define AON_BATMON_FLASHPUMPP0_CFG_W 4 272 #define AON_BATMON_FLASHPUMPP0_CFG_M 0x0000000F 273 #define AON_BATMON_FLASHPUMPP0_CFG_S 0 274 275 //***************************************************************************** 276 // 277 // Register: AON_BATMON_O_BAT 278 // 279 //***************************************************************************** 280 // Field: [10:8] INT 281 // 282 // Integer part: 283 // 284 // 0x0: 0V + fractional part 285 // ... 286 // 0x3: 3V + fractional part 287 // 0x4: 4V + fractional part 288 #define AON_BATMON_BAT_INT_W 3 289 #define AON_BATMON_BAT_INT_M 0x00000700 290 #define AON_BATMON_BAT_INT_S 8 291 292 // Field: [7:0] FRAC 293 // 294 // Fractional part, standard binary fractional encoding. 295 // 296 // 0x00: .0V 297 // ... 298 // 0x20: 1/8 = .125V 299 // 0x40: 1/4 = .25V 300 // 0x80: 1/2 = .5V 301 // ... 302 // 0xA0: 1/2 + 1/8 = .625V 303 // ... 304 // 0xFF: Max 305 #define AON_BATMON_BAT_FRAC_W 8 306 #define AON_BATMON_BAT_FRAC_M 0x000000FF 307 #define AON_BATMON_BAT_FRAC_S 0 308 309 //***************************************************************************** 310 // 311 // Register: AON_BATMON_O_BATUPD 312 // 313 //***************************************************************************** 314 // Field: [0] STAT 315 // 316 // 317 // 0: No update since last clear 318 // 1: New battery voltage is present. 319 // 320 // Write 1 to clear the status. 321 #define AON_BATMON_BATUPD_STAT 0x00000001 322 #define AON_BATMON_BATUPD_STAT_BITN 0 323 #define AON_BATMON_BATUPD_STAT_M 0x00000001 324 #define AON_BATMON_BATUPD_STAT_S 0 325 326 //***************************************************************************** 327 // 328 // Register: AON_BATMON_O_TEMP 329 // 330 //***************************************************************************** 331 // Field: [16:8] INT 332 // 333 // Integer part (signed) of temperature value. 334 // Total value = INTEGER + FRACTIONAL 335 // 2's complement encoding 336 // 337 // 0x100: Min value 338 // 0x1D8: -40C 339 // 0x1FF: -1C 340 // 0x00: 0C 341 // 0x1B: 27C 342 // 0x55: 85C 343 // 0xFF: Max value 344 #define AON_BATMON_TEMP_INT_W 9 345 #define AON_BATMON_TEMP_INT_M 0x0001FF00 346 #define AON_BATMON_TEMP_INT_S 8 347 348 //***************************************************************************** 349 // 350 // Register: AON_BATMON_O_TEMPUPD 351 // 352 //***************************************************************************** 353 // Field: [0] STAT 354 // 355 // 356 // 0: No update since last clear 357 // 1: New temperature is present. 358 // 359 // Write 1 to clear the status. 360 #define AON_BATMON_TEMPUPD_STAT 0x00000001 361 #define AON_BATMON_TEMPUPD_STAT_BITN 0 362 #define AON_BATMON_TEMPUPD_STAT_M 0x00000001 363 #define AON_BATMON_TEMPUPD_STAT_S 0 364 365 //***************************************************************************** 366 // 367 // Register: AON_BATMON_O_EVENTMASK 368 // 369 //***************************************************************************** 370 // Field: [5] TEMP_UPDATE_MASK 371 // 372 // 1: EVENT.TEMP_UPDATE contributes to combined event from BATMON 373 // 0: EVENT.TEMP_UPDATE does not contribute to combined event from BATMON 374 #define AON_BATMON_EVENTMASK_TEMP_UPDATE_MASK 0x00000020 375 #define AON_BATMON_EVENTMASK_TEMP_UPDATE_MASK_BITN 5 376 #define AON_BATMON_EVENTMASK_TEMP_UPDATE_MASK_M 0x00000020 377 #define AON_BATMON_EVENTMASK_TEMP_UPDATE_MASK_S 5 378 379 // Field: [4] BATT_UPDATE_MASK 380 // 381 // 1: EVENT.BATT_UPDATE contributes to combined event from BATMON 382 // 0: EVENT.BATT_UPDATE does not contribute to combined event from BATMON 383 #define AON_BATMON_EVENTMASK_BATT_UPDATE_MASK 0x00000010 384 #define AON_BATMON_EVENTMASK_BATT_UPDATE_MASK_BITN 4 385 #define AON_BATMON_EVENTMASK_BATT_UPDATE_MASK_M 0x00000010 386 #define AON_BATMON_EVENTMASK_BATT_UPDATE_MASK_S 4 387 388 // Field: [3] TEMP_BELOW_LL_MASK 389 // 390 // 1: EVENT.TEMP_BELOW_LL contributes to combined event from BATMON 391 // 0: EVENT.TEMP_BELOW_LL does not contribute to combined event from BATMON 392 #define AON_BATMON_EVENTMASK_TEMP_BELOW_LL_MASK 0x00000008 393 #define AON_BATMON_EVENTMASK_TEMP_BELOW_LL_MASK_BITN 3 394 #define AON_BATMON_EVENTMASK_TEMP_BELOW_LL_MASK_M 0x00000008 395 #define AON_BATMON_EVENTMASK_TEMP_BELOW_LL_MASK_S 3 396 397 // Field: [2] TEMP_OVER_UL_MASK 398 // 399 // 1: EVENT.TEMP_OVER_UL contributes to combined event from BATMON 400 // 0: EVENT.TEMP_OVER_UL does not contribute to combined event from BATMON 401 #define AON_BATMON_EVENTMASK_TEMP_OVER_UL_MASK 0x00000004 402 #define AON_BATMON_EVENTMASK_TEMP_OVER_UL_MASK_BITN 2 403 #define AON_BATMON_EVENTMASK_TEMP_OVER_UL_MASK_M 0x00000004 404 #define AON_BATMON_EVENTMASK_TEMP_OVER_UL_MASK_S 2 405 406 // Field: [1] BATT_BELOW_LL_MASK 407 // 408 // 1: EVENT.BATT_BELOW_LL contributes to combined event from BATMON 409 // 0: EVENT.BATT_BELOW_LL does not contribute to combined event from BATMON 410 #define AON_BATMON_EVENTMASK_BATT_BELOW_LL_MASK 0x00000002 411 #define AON_BATMON_EVENTMASK_BATT_BELOW_LL_MASK_BITN 1 412 #define AON_BATMON_EVENTMASK_BATT_BELOW_LL_MASK_M 0x00000002 413 #define AON_BATMON_EVENTMASK_BATT_BELOW_LL_MASK_S 1 414 415 // Field: [0] BATT_OVER_UL_MASK 416 // 417 // 1: EVENT.BATT_OVER_UL contributes to combined event from BATMON 418 // 0: EVENT.BATT_OVER_UL does not contribute to combined event from BATMON 419 #define AON_BATMON_EVENTMASK_BATT_OVER_UL_MASK 0x00000001 420 #define AON_BATMON_EVENTMASK_BATT_OVER_UL_MASK_BITN 0 421 #define AON_BATMON_EVENTMASK_BATT_OVER_UL_MASK_M 0x00000001 422 #define AON_BATMON_EVENTMASK_BATT_OVER_UL_MASK_S 0 423 424 //***************************************************************************** 425 // 426 // Register: AON_BATMON_O_EVENT 427 // 428 //***************************************************************************** 429 // Field: [5] TEMP_UPDATE 430 // 431 // Alias to TEMPUPD.STAT 432 #define AON_BATMON_EVENT_TEMP_UPDATE 0x00000020 433 #define AON_BATMON_EVENT_TEMP_UPDATE_BITN 5 434 #define AON_BATMON_EVENT_TEMP_UPDATE_M 0x00000020 435 #define AON_BATMON_EVENT_TEMP_UPDATE_S 5 436 437 // Field: [4] BATT_UPDATE 438 // 439 // Alias to BATUPD.STAT 440 #define AON_BATMON_EVENT_BATT_UPDATE 0x00000010 441 #define AON_BATMON_EVENT_BATT_UPDATE_BITN 4 442 #define AON_BATMON_EVENT_BATT_UPDATE_M 0x00000010 443 #define AON_BATMON_EVENT_BATT_UPDATE_S 4 444 445 // Field: [3] TEMP_BELOW_LL 446 // 447 // Read: 448 // 1: Temperature level is below the lower limit set by TEMPLL. 449 // 0: Temperature level is not below the lower limit set by TEMPLL. 450 // Write: 451 // 1: Clears the flag 452 // 0: No change in the flag 453 #define AON_BATMON_EVENT_TEMP_BELOW_LL 0x00000008 454 #define AON_BATMON_EVENT_TEMP_BELOW_LL_BITN 3 455 #define AON_BATMON_EVENT_TEMP_BELOW_LL_M 0x00000008 456 #define AON_BATMON_EVENT_TEMP_BELOW_LL_S 3 457 458 // Field: [2] TEMP_OVER_UL 459 // 460 // Read: 461 // 1: Temperature level is above the upper limit set by TEMPUL. 462 // 0: Temperature level is not above the upper limit set by TEMPUL. 463 // Write: 464 // 1: Clears the flag 465 // 0: No change in the flag 466 #define AON_BATMON_EVENT_TEMP_OVER_UL 0x00000004 467 #define AON_BATMON_EVENT_TEMP_OVER_UL_BITN 2 468 #define AON_BATMON_EVENT_TEMP_OVER_UL_M 0x00000004 469 #define AON_BATMON_EVENT_TEMP_OVER_UL_S 2 470 471 // Field: [1] BATT_BELOW_LL 472 // 473 // Read: 474 // 1: Battery level is below the lower limit set by BATTLL. 475 // 0: Battery level is not below the lower limit set by BATTLL. 476 // Write: 477 // 1: Clears the flag 478 // 0: No change in the flag 479 #define AON_BATMON_EVENT_BATT_BELOW_LL 0x00000002 480 #define AON_BATMON_EVENT_BATT_BELOW_LL_BITN 1 481 #define AON_BATMON_EVENT_BATT_BELOW_LL_M 0x00000002 482 #define AON_BATMON_EVENT_BATT_BELOW_LL_S 1 483 484 // Field: [0] BATT_OVER_UL 485 // 486 // Read: 487 // 1: Battery level is above the upper limit set by BATTUL. 488 // 0: Battery level is not above the upper limit set by BATTUL. 489 // Write: 490 // 1: Clears the flag 491 // 0: No change in the flag 492 #define AON_BATMON_EVENT_BATT_OVER_UL 0x00000001 493 #define AON_BATMON_EVENT_BATT_OVER_UL_BITN 0 494 #define AON_BATMON_EVENT_BATT_OVER_UL_M 0x00000001 495 #define AON_BATMON_EVENT_BATT_OVER_UL_S 0 496 497 //***************************************************************************** 498 // 499 // Register: AON_BATMON_O_BATTUL 500 // 501 //***************************************************************************** 502 // Field: [10:8] INT 503 // 504 // Integer part: 505 // 506 // 0x0: 0V + fractional part 507 // ... 508 // 0x3: 3V + fractional part 509 // 0x4: 4V + fractional part 510 #define AON_BATMON_BATTUL_INT_W 3 511 #define AON_BATMON_BATTUL_INT_M 0x00000700 512 #define AON_BATMON_BATTUL_INT_S 8 513 514 // Field: [7:0] FRAC 515 // 516 // Fractional part, standard binary fractional encoding. 517 // 518 // 0x00: .0V 519 // ... 520 // 0x20: 1/8 = .125V 521 // 0x40: 1/4 = .25V 522 // 0x80: 1/2 = .5V 523 // ... 524 // 0xA0: 1/2 + 1/8 = .625V 525 // ... 526 // 0xFF: Max 527 #define AON_BATMON_BATTUL_FRAC_W 8 528 #define AON_BATMON_BATTUL_FRAC_M 0x000000FF 529 #define AON_BATMON_BATTUL_FRAC_S 0 530 531 //***************************************************************************** 532 // 533 // Register: AON_BATMON_O_BATTLL 534 // 535 //***************************************************************************** 536 // Field: [10:8] INT 537 // 538 // Integer part: 539 // 540 // 0x0: 0V + fractional part 541 // ... 542 // 0x3: 3V + fractional part 543 // 0x4: 4V + fractional part 544 #define AON_BATMON_BATTLL_INT_W 3 545 #define AON_BATMON_BATTLL_INT_M 0x00000700 546 #define AON_BATMON_BATTLL_INT_S 8 547 548 // Field: [7:0] FRAC 549 // 550 // Fractional part, standard binary fractional encoding. 551 // 552 // 0x00: .0V 553 // ... 554 // 0x20: 1/8 = .125V 555 // 0x40: 1/4 = .25V 556 // 0x80: 1/2 = .5V 557 // ... 558 // 0xA0: 1/2 + 1/8 = .625V 559 // ... 560 // 0xFF: Max 561 #define AON_BATMON_BATTLL_FRAC_W 8 562 #define AON_BATMON_BATTLL_FRAC_M 0x000000FF 563 #define AON_BATMON_BATTLL_FRAC_S 0 564 565 //***************************************************************************** 566 // 567 // Register: AON_BATMON_O_TEMPUL 568 // 569 //***************************************************************************** 570 // Field: [16:8] INT 571 // 572 // Integer part (signed) of temperature upper limit. 573 // Total value = INTEGER + FRACTIONAL 574 // 2's complement encoding 575 // 576 // 0x100: Min value 577 // 0x1D8: -40C 578 // 0x1FF: -1C 579 // 0x00: 0C 580 // 0x1B: 27C 581 // 0x55: 85C 582 // 0xFF: Max value 583 #define AON_BATMON_TEMPUL_INT_W 9 584 #define AON_BATMON_TEMPUL_INT_M 0x0001FF00 585 #define AON_BATMON_TEMPUL_INT_S 8 586 587 // Field: [7:6] FRAC 588 // 589 // Fractional part of temperature upper limit. 590 // Total value = INTEGER + FRACTIONAL 591 // The encoding is an extension of the 2's complement encoding. 592 // 593 // 00: 0.0C 594 // 01: 0.25C 595 // 10: 0.5C 596 // 11: 0.75C 597 // 598 // For example: 599 // 000000001,00 = ( 1+0,00) = 1,00 600 // 000000000,11 = ( 0+0,75) = 0,75 601 // 000000000,10 = ( 0+0,50) = 0,50 602 // 000000000,01 = ( 0+0,25) = 0,25 603 // 000000000,00 = ( 0+0,00) = 0,00 604 // 111111111,11 = (-1+0,75) = -0,25 605 // 111111111,10 = (-1+0,50) = -0,50 606 // 111111111,01 = (-1+0,25) = -0,75 607 // 111111111,00 = (-1+0,00) = -1,00 608 // 111111110,11 = (-2+0,75) = -1,25 609 #define AON_BATMON_TEMPUL_FRAC_W 2 610 #define AON_BATMON_TEMPUL_FRAC_M 0x000000C0 611 #define AON_BATMON_TEMPUL_FRAC_S 6 612 613 //***************************************************************************** 614 // 615 // Register: AON_BATMON_O_TEMPLL 616 // 617 //***************************************************************************** 618 // Field: [16:8] INT 619 // 620 // Integer part (signed) of temperature lower limit. 621 // Total value = INTEGER + FRACTIONAL 622 // 2's complement encoding 623 // 624 // 0x100: Min value 625 // 0x1D8: -40C 626 // 0x1FF: -1C 627 // 0x00: 0C 628 // 0x1B: 27C 629 // 0x55: 85C 630 // 0xFF: Max value 631 #define AON_BATMON_TEMPLL_INT_W 9 632 #define AON_BATMON_TEMPLL_INT_M 0x0001FF00 633 #define AON_BATMON_TEMPLL_INT_S 8 634 635 // Field: [7:6] FRAC 636 // 637 // Fractional part of temperature lower limit. 638 // Total value = INTEGER + FRACTIONAL 639 // The encoding is an extension of the 2's complement encoding. 640 // 641 // 00: 0.0C 642 // 01: 0.25C 643 // 10: 0.5C 644 // 11: 0.75C 645 // 646 // For example: 647 // 000000001,00 = ( 1+0,00) = 1,00 648 // 000000000,11 = ( 0+0,75) = 0,75 649 // 000000000,10 = ( 0+0,50) = 0,50 650 // 000000000,01 = ( 0+0,25) = 0,25 651 // 000000000,00 = ( 0+0,00) = 0,00 652 // 111111111,11 = (-1+0,75) = -0,25 653 // 111111111,10 = (-1+0,50) = -0,50 654 // 111111111,01 = (-1+0,25) = -0,75 655 // 111111111,00 = (-1+0,00) = -1,00 656 // 111111110,11 = (-2+0,75) = -1,25 657 #define AON_BATMON_TEMPLL_FRAC_W 2 658 #define AON_BATMON_TEMPLL_FRAC_M 0x000000C0 659 #define AON_BATMON_TEMPLL_FRAC_S 6 660 661 662 #endif // __AON_BATMON__ 663