| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Macros | Variables
retention.ino File Reference

Go to the source code of this file.

## Functions
bool | is_ltc297x (uint8_t address)
bool | is_ltc2977 (uint8_t address)
bool | is_ltc2978 (uint8_t address)
static uint8_t | wait_for_ack (uint8_t address, uint8_t command)
static void | wait_for_ready (uint8_t address)
static uint8_t | wait_for_not_busy (uint8_t address)
static uint8_t | wait_for_nvm_done (uint8_t address)
static void | store_fault_logs ()
static void | clear_fault_logs ()
static void | clear_faults_global (void)
static void | lock_nvm (uint8_t address)
static void | unlock_nvm (uint8_t address)
static void | nvm_lock_reset (uint8_t address)
bool | check_nvm_data_checksum (uint8_t address)
static void | erase (uint8_t address, uint16_t **data)
bool | check_health (uint8_t address)
static void | increment_counter (uint8_t address)
static void | print_counter (uint8_t address)
static void | store ()
static void | restore ()
static void | read_bytes (uint8_t address, uint16_t **data, uint16_t *count)
static void | write_bytes (uint8_t address, uint16_t **data, uint16_t *count)
static float | readItemp2977_8 (uint8_t address)
static float | readItemp (uint8_t address)
static void | print_all_status ()
| Print all status bytes and words. More...
static void | setup ()
static void | loop ()
static void | print_title ()
| Prints the title block when program first starts. More...
static void | print_prompt ()
| Prints main menu. More...

## Macros
#define | CML 1
#define | BUSY 7
#define | RESERVED2 2
#define | USE_PEND 1
#define | NOT_BUSY 1 << 6
#define | NOT_TRANS 1 << 4
#define | NOT_PENDING 1 << 5
#define | PAGE 0x00
#define | CLEAR_FAULTS 0x03
#define | STORE_USER_ALL 0x15
#define | RESTORE_USER_ALL 0x16
#define | STATUS_BYTE 0x78
#define | STATUS_WORD 0x79
#define | STATUS_CML 0x7E
#define | STATUS_MFR_SPECIFIC 0x80
#define | READ_ITEMP_2977_8 0x8D
#define | READ_ITEMP 0x8E
#define | USER_DATA_04 0xB4
#define | MFR_EE_UNLOCK 0xBD
#define | MFR_EE_ERASE 0xBE
#define | MFR_EE_DATA 0xBF
#define | MFR_PAGE_FF_MASK 0xE4
#define | MFR_FAULT_LOG_STORE 0xEA
#define | MFR_FAULT_LOG_RESTORE 0xEB
#define | MFR_FAULT_LOG_CLEAR 0xEC
#define | MFR_SPECIAL_ID 0xE7
#define | MFR_COMMON 0xEF
#define | MFR_EEPROM_STATUS 0xF1
#define | MFR_SPARE_0 0xF7
#define | MFR_RESET 0xFD
#define | STATUS_CML_CMD_FAULT 0x80
#define | STATUS_CML_DATA_FAULT 0x40
#define | STATUS_CML_PEC_FAULT 0x20
#define | STATUS_CML_MEM_FAULT 0x10
#define | STATUS_CML_PROC_FAULT 0x04
#define | STATUS_CML_PMBUS_FAULT 0x02
#define | STATUS_CML_UNKNOWN_FAULT 0x01
#define | STATUS_MFR_SPECIFIC_NVM_CRC 0x20
#define | STATUS_WORD_POWER_GOOD_B 0x0800
#define | LTC3880_I2C_ADDRESS 0x30
#define | LTC2974_I2C_ADDRESS 0x32
#define | LTC2977_8_I2C_ADDRESS 0x33

## Variables
static uint16_t * | ltc3880data
static uint16_t | ltc3880dataCount
static uint16_t * | ltc2974data
static uint16_t | ltc2974dataCount
static uint16_t * | ltc2977data
static uint16_t | ltc2977dataCount
LT_SMBusGroup * | smbus = (LT_SMBusGroup *) new LT_SMBusNoPec()

## Function Documentation

## ◆ check_health()

bool check_health | ( | uint8_t | address | ) |

Definition at line 399 of file retention.ino.

## ◆ check_nvm_data_checksum()

bool check_nvm_data_checksum | ( | uint8_t | address | ) |

Definition at line 345 of file retention.ino.

## ◆ clear_fault_logs()

static void clear_fault_logs | ( |  | ) |
| static

Definition at line 287 of file retention.ino.

## ◆ clear_faults_global()

static void clear_faults_global | ( | void |  | ) |
| static

Definition at line 292 of file retention.ino.

## ◆ erase()

static void erase | ( | uint8_t | address,
|  | uint16_t ** | data
| ) |  |
| static

Definition at line 380 of file retention.ino.

## ◆ increment_counter()

static void increment_counter | ( | uint8_t | address | ) |
| static

Definition at line 463 of file retention.ino.

## ◆ is_ltc2977()

bool is_ltc2977 | ( | uint8_t | address | ) |

Definition at line 162 of file retention.ino.

## ◆ is_ltc2978()

bool is_ltc2978 | ( | uint8_t | address | ) |

Definition at line 179 of file retention.ino.

## ◆ is_ltc297x()

bool is_ltc297x | ( | uint8_t | address | ) |

Definition at line 141 of file retention.ino.

## ◆ lock_nvm()

static void lock_nvm | ( | uint8_t | address | ) |
| static

Definition at line 320 of file retention.ino.

## ◆ loop()

static void loop | ( | void |  | ) |
| static

Definition at line 701 of file retention.ino.

## ◆ nvm_lock_reset()

static void nvm_lock_reset | ( | uint8_t | address | ) |
| static

Definition at line 338 of file retention.ino.

## ◆ print_all_status()

static void print_all_status | ( |  | ) |
| static

Print all status bytes and words.

Returns
  void

Definition at line 634 of file retention.ino.

## ◆ print_counter()

static void print_counter | ( | uint8_t | address | ) |
| static

Definition at line 488 of file retention.ino.

## ◆ print_prompt()

static void print_prompt | ( |  | ) |
| static

Prints main menu.

Definition at line 923 of file retention.ino.

## ◆ print_title()

static void print_title | ( | void |  | ) |
| static

Prints the title block when program first starts.

Definition at line 910 of file retention.ino.

## ◆ read_bytes()

static void read_bytes | ( | uint8_t | address,
|  | uint16_t ** | data,
|  | uint16_t * | count
| ) |  |
| static

Definition at line 517 of file retention.ino.

## ◆ readItemp()

static float readItemp | ( | uint8_t | address | ) |
| static

Definition at line 621 of file retention.ino.

## ◆ readItemp2977_8()

static float readItemp2977_8 | ( | uint8_t | address | ) |
| static

Definition at line 610 of file retention.ino.

## ◆ restore()

static void restore | ( |  | ) |
| static

Definition at line 512 of file retention.ino.

## ◆ setup()

static void setup | ( | void |  | ) |
| static

Definition at line 680 of file retention.ino.

## ◆ store()

static void store | ( |  | ) |
| static

Definition at line 507 of file retention.ino.

## ◆ store_fault_logs()

static void store_fault_logs | ( |  | ) |
| static

Definition at line 282 of file retention.ino.

## ◆ unlock_nvm()

static void unlock_nvm | ( | uint8_t | address | ) |
| static

Definition at line 326 of file retention.ino.

## ◆ wait_for_ack()

static uint8_t wait_for_ack | ( | uint8_t | address,
|  | uint8_t | command
| ) |  |
| static

Definition at line 188 of file retention.ino.

## ◆ wait_for_not_busy()

static uint8_t wait_for_not_busy | ( | uint8_t | address | ) |
| static

Definition at line 245 of file retention.ino.

## ◆ wait_for_nvm_done()

static uint8_t wait_for_nvm_done | ( | uint8_t | address | ) |
| static

Definition at line 263 of file retention.ino.

## ◆ wait_for_ready()

static void wait_for_ready | ( | uint8_t | address | ) |
| static

Definition at line 201 of file retention.ino.

## ◆ write_bytes()

static void write_bytes | ( | uint8_t | address,
|  | uint16_t ** | data,
|  | uint16_t * | count
| ) |  |
| static

Definition at line 552 of file retention.ino.

## Macro Definition Documentation

## ◆ BUSY

#define BUSY 7

Definition at line 68 of file retention.ino.

## ◆ CLEAR_FAULTS

#define CLEAR_FAULTS 0x03

Definition at line 85 of file retention.ino.

## ◆ CML

#define CML 1

Definition at line 67 of file retention.ino.

## ◆ LTC2974_I2C_ADDRESS

#define LTC2974_I2C_ADDRESS 0x32

Definition at line 124 of file retention.ino.

## ◆ LTC2977_8_I2C_ADDRESS

#define LTC2977_8_I2C_ADDRESS 0x33

Definition at line 126 of file retention.ino.

## ◆ LTC3880_I2C_ADDRESS

#define LTC3880_I2C_ADDRESS 0x30

Definition at line 123 of file retention.ino.

## ◆ MFR_COMMON

#define MFR_COMMON 0xEF

Definition at line 103 of file retention.ino.

## ◆ MFR_EE_DATA

#define MFR_EE_DATA 0xBF

Definition at line 97 of file retention.ino.

## ◆ MFR_EE_ERASE

#define MFR_EE_ERASE 0xBE

Definition at line 96 of file retention.ino.

## ◆ MFR_EE_UNLOCK

#define MFR_EE_UNLOCK 0xBD

Definition at line 95 of file retention.ino.

## ◆ MFR_EEPROM_STATUS

#define MFR_EEPROM_STATUS 0xF1

Definition at line 104 of file retention.ino.

## ◆ MFR_FAULT_LOG_CLEAR

#define MFR_FAULT_LOG_CLEAR 0xEC

Definition at line 101 of file retention.ino.

## ◆ MFR_FAULT_LOG_RESTORE

#define MFR_FAULT_LOG_RESTORE 0xEB

Definition at line 100 of file retention.ino.

## ◆ MFR_FAULT_LOG_STORE

#define MFR_FAULT_LOG_STORE 0xEA

Definition at line 99 of file retention.ino.

## ◆ MFR_PAGE_FF_MASK

#define MFR_PAGE_FF_MASK 0xE4

Definition at line 98 of file retention.ino.

## ◆ MFR_RESET

#define MFR_RESET 0xFD

Definition at line 106 of file retention.ino.

## ◆ MFR_SPARE_0

#define MFR_SPARE_0 0xF7

Definition at line 105 of file retention.ino.

## ◆ MFR_SPECIAL_ID

#define MFR_SPECIAL_ID 0xE7

Definition at line 102 of file retention.ino.

## ◆ NOT_BUSY

#define NOT_BUSY 1 << 6

Definition at line 75 of file retention.ino.

## ◆ NOT_PENDING

#define NOT_PENDING 1 << 5

Definition at line 78 of file retention.ino.

## ◆ NOT_TRANS

#define NOT_TRANS 1 << 4

Definition at line 76 of file retention.ino.

## ◆ PAGE

#define PAGE 0x00

Definition at line 84 of file retention.ino.

## ◆ READ_ITEMP

#define READ_ITEMP 0x8E

Definition at line 93 of file retention.ino.

## ◆ READ_ITEMP_2977_8

#define READ_ITEMP_2977_8 0x8D

Definition at line 92 of file retention.ino.

## ◆ RESERVED2

#define RESERVED2 2

Definition at line 69 of file retention.ino.

## ◆ RESTORE_USER_ALL

#define RESTORE_USER_ALL 0x16

Definition at line 87 of file retention.ino.

## ◆ STATUS_BYTE

#define STATUS_BYTE 0x78

Definition at line 88 of file retention.ino.

## ◆ STATUS_CML

#define STATUS_CML 0x7E

Definition at line 90 of file retention.ino.

## ◆ STATUS_CML_CMD_FAULT

#define STATUS_CML_CMD_FAULT 0x80

Definition at line 109 of file retention.ino.

## ◆ STATUS_CML_DATA_FAULT

#define STATUS_CML_DATA_FAULT 0x40

Definition at line 110 of file retention.ino.

## ◆ STATUS_CML_MEM_FAULT

#define STATUS_CML_MEM_FAULT 0x10

Definition at line 112 of file retention.ino.

## ◆ STATUS_CML_PEC_FAULT

#define STATUS_CML_PEC_FAULT 0x20

Definition at line 111 of file retention.ino.

## ◆ STATUS_CML_PMBUS_FAULT

#define STATUS_CML_PMBUS_FAULT 0x02

Definition at line 114 of file retention.ino.

## ◆ STATUS_CML_PROC_FAULT

#define STATUS_CML_PROC_FAULT 0x04

Definition at line 113 of file retention.ino.

## ◆ STATUS_CML_UNKNOWN_FAULT

#define STATUS_CML_UNKNOWN_FAULT 0x01

Definition at line 115 of file retention.ino.

## ◆ STATUS_MFR_SPECIFIC

#define STATUS_MFR_SPECIFIC 0x80

Definition at line 91 of file retention.ino.

## ◆ STATUS_MFR_SPECIFIC_NVM_CRC

#define STATUS_MFR_SPECIFIC_NVM_CRC 0x20

Definition at line 118 of file retention.ino.

## ◆ STATUS_WORD

#define STATUS_WORD 0x79

Definition at line 89 of file retention.ino.

## ◆ STATUS_WORD_POWER_GOOD_B

#define STATUS_WORD_POWER_GOOD_B 0x0800

Definition at line 121 of file retention.ino.

## ◆ STORE_USER_ALL

#define STORE_USER_ALL 0x15

Definition at line 86 of file retention.ino.

## ◆ USE_PEND

#define USE_PEND 1

Definition at line 73 of file retention.ino.

## ◆ USER_DATA_04

#define USER_DATA_04 0xB4

Definition at line 94 of file retention.ino.

## Variable Documentation

## ◆ ltc2974data

uint16_t* ltc2974data
| static

Definition at line 133 of file retention.ino.

## ◆ ltc2974dataCount

uint16_t ltc2974dataCount
| static

Definition at line 134 of file retention.ino.

## ◆ ltc2977data

uint16_t* ltc2977data
| static

Definition at line 135 of file retention.ino.

## ◆ ltc2977dataCount

uint16_t ltc2977dataCount
| static

Definition at line 136 of file retention.ino.

## ◆ ltc3880data

uint16_t* ltc3880data
| static

Definition at line 131 of file retention.ino.

## ◆ ltc3880dataCount

uint16_t ltc3880dataCount
| static

Definition at line 132 of file retention.ino.

## ◆ smbus

LT_SMBusGroup* smbus = (LT_SMBusGroup *) new LT_SMBusNoPec()

Definition at line 139 of file retention.ino.