Trimming Support Macro Definition Documentation

 

NULL_POINTER

#define NULL_POINTER 0

 

NULL pointer.

 

Location: trim.h:54

 

MIN_32_BIT

#define MIN_32_BIT 0x00000000UL

 

Minimum 32-bit value.

 

Location: trim.h:58

 

MAX_32_BIT

#define MAX_32_BIT 0xFFFFFFFFUL

 

Maximum 32-bit value.

 

Location: trim.h:61

 

MIN_18_BIT

#define MIN_18_BIT 0x00000U

 

Minimum 18-bit value.

 

Location: trim.h:64

 

MAX_18_BIT

#define MAX_18_BIT 0x3FFFFU

 

Maximum 18-bit value.

 

Location: trim.h:67

 

MIN_16_BIT

#define MIN_16_BIT 0x0000U

 

Minimum 16-bit value.

 

Location: trim.h:70

 

MAX_16_BIT

#define MAX_16_BIT 0xFFFFU

 

Maximum 16-bit value.

 

Location: trim.h:73

 

MIN_8_BIT

#define MIN_8_BIT 0x00U

 

Minimum 8-bit value.

 

Location: trim.h:76

 

MAX_8_BIT

#define MAX_8_BIT 0xFFU

 

Maximum 8-bit value.

 

Location: trim.h:79

 

MAX_4_BIT

#define MAX_4_BIT 0xFU

 

Maximum 4-bit value.

 

Location: trim.h:82

 

ERROR_NO_ERROR

#define ERROR_NO_ERROR 0

 

Location: trim.h:86

 

errors

 

ERROR_NULL

#define ERROR_NULL (1 << 1)

 

Null pointer error.

 

Location: trim.h:89

 

ERROR_NO_TRIM_FOUND

#define ERROR_NO_TRIM_FOUND (1 << 3)

 

Target trim value not found.

 

Location: trim.h:92

 

ERROR_INVALID_TRIM

#define ERROR_INVALID_TRIM (1 << 4)

 

Trims in region specified are not valid.

 

Location: trim.h:95

 

ERROR_INVALID_CRC

#define ERROR_INVALID_CRC (1 << 5)

 

Trim region CRC has failed.

 

Location: trim.h:98

 

ERROR_BG_INVALID

#define ERROR_BG_INVALID (1 << 6)

 

Bandgap target value is invalid.

 

Location: trim.h:101

 

ERROR_BG_V_INVALID

#define ERROR_BG_V_INVALID (1 << 7)

 

Bandgap voltage trim is invalid.

 

Location: trim.h:104

 

ERROR_BG_I_INVALID

#define ERROR_BG_I_INVALID (1 << 8)

 

Bandgap current trim is invalid.

 

Location: trim.h:107

 

ERROR_DCDC_INVALID

#define ERROR_DCDC_INVALID (1 << 9)

 

DCDC trim is invalid.

 

Location: trim.h:110

 

ERROR_VDDC_INVALID

#define ERROR_VDDC_INVALID (1 << 10)

 

VDDC trim is invalid.

 

Location: trim.h:113

 

ERROR_VDDC_STBY_INVALID

#define ERROR_VDDC_STBY_INVALID (1 << 11)

 

VDCC standby trim is invalid.

 

Location: trim.h:116

 

ERROR_VDDM_INVALID

#define ERROR_VDDM_INVALID (1 << 12)

 

VDDM trim is invalid.

 

Location: trim.h:119

 

ERROR_VDDM_STBY_INVALID

#define ERROR_VDDM_STBY_INVALID (1 << 13)

 

VDCM standby trim is invalid.

 

Location: trim.h:122

 

ERROR_VDDRF_INVALID

#define ERROR_VDDRF_INVALID (1 << 14)

 

VDDRF trim is invalid.

 

Location: trim.h:125

 

ERROR_VDDPA_INVALID

#define ERROR_VDDPA_INVALID (1 << 15)

 

VDDPA trim is invalid.

 

Location: trim.h:128

 

ERROR_VDDPA_MIN_INVALID

#define ERROR_VDDPA_MIN_INVALID (1 << 16)

 

VDDPA minimum trim is invalid.

 

Location: trim.h:131

 

ERROR_VDDIF_INVALID

#define ERROR_VDDIF_INVALID (1 << 17)

 

VDDIF trim is invalid.

 

Location: trim.h:134

 

ERROR_VDDFLASH_INVALID

#define ERROR_VDDFLASH_INVALID (1 << 18)

 

VDDFLASH trim is invalid.

 

Location: trim.h:137

 

ERROR_RCOSC_INVALID

#define ERROR_RCOSC_INVALID (1 << 19)

 

RC start oscillator trim is invalid.

 

Location: trim.h:140

 

ERROR_RCOSC32_INVALID

#define ERROR_RCOSC32_INVALID (1 << 20)

 

RC standby oscillator trim is invalid.

 

Location: trim.h:143

 

ERROR_LSAD_INVALID

#define ERROR_LSAD_INVALID (1 << 21)

 

LSAD gain or offset is invalid.

 

Location: trim.h:146

 

ERROR_TEMPERATURE_INVALID

#define ERROR_TEMPERATURE_INVALID (1 << 22)

 

Temperature sensor gain or offset is invalid.

 

Location: trim.h:149

 

ERROR_THERMISTOR_INVALID

#define ERROR_THERMISTOR_INVALID (1 << 23)

 

Thermistor gain or offset is invalid.

 

Location: trim.h:152

 

ERROR_MEASURED_INVALID

#define ERROR_MEASURED_INVALID (1 << 25)

 

Measured reference temperature is invalid.

 

Location: trim.h:155

 

ERROR_TRIM_CUSTOM_SIGNATURE_INVALID

#define ERROR_TRIM_CUSTOM_SIGNATURE_INVALID (1 << 26)

 

Custom signature check is invalid.

 

Location: trim.h:158

 

ERROR_TRIM_CUSTOM_ICH_INVALID

#define ERROR_TRIM_CUSTOM_ICH_INVALID (1 << 27)

 

Custom ICH trim value is invalid.

 

Location: trim.h:161

 

ERROR_TRIM_CUSTOM_XTAL_INVALID

#define ERROR_TRIM_CUSTOM_XTAL_INVALID (1 << 28)

 

Custom Xtal trim value is invalid.

 

Location: trim.h:164

 

TR_REG_TRIM_MASK

#define TR_REG_TRIM_MASK 0x3FU

 

Temperature record 18-bit trim value mask.

 

Location: trim.h:224

 

TRIM_8_BIT_TRIM_MASK

#define TRIM_8_BIT_TRIM_MASK 0xFFU

 

8-bit trim value mask

 

Location: trim.h:227

 

TRIM_16_BIT_TRIM_MASK

#define TRIM_16_BIT_TRIM_MASK 0xFFFFU

 

16-bit trim value mask

 

Location: trim.h:230

 

TRIM_NVR7_2_BIT_RC_FSEL_MASK

#define TRIM_NVR7_2_BIT_RC_FSEL_MASK (0x3U << 7)

 

Location: trim.h:233

 

TRIM_NVR7_VCC_DCDC_Pos

#define TRIM_NVR7_VCC_DCDC_Pos 8

 

Location: trim.h:236

 

LSAD_HF

#define LSAD_HF 0

 

LSAD high frequency compensation values.

 

Location: trim.h:240

 

LSAD_LF

#define LSAD_LF 1

 

LSAD low frequency compensation values.

 

Location: trim.h:243

 

LSAD_OFFSET

#define LSAD_OFFSET 0x00U

 

LSAD offset compensation address offset.

 

Location: trim.h:246

 

LSAD_OFFSET_MASK

#define LSAD_OFFSET_MASK 0xFFU

 

LSAD offset compensation mask.

 

Location: trim.h:249

 

LSAD_GAIN

#define LSAD_GAIN 0x04U

 

LSAD gain compensation address offset.

 

Location: trim.h:252

 

LSAD_GAIN_MASK

#define LSAD_GAIN_MASK 0x3FFU

 

LSAD gain compensation mask.

 

Location: trim.h:255

 

TRIM

#define TRIM (TRIM_Type *)TRIM_BASE_DEFAULT

 

Default trim instance, pointing to NVR7.

 

Location: trim.h:265

 

TRIM_SUPPLEMENTAL

#define TRIM_SUPPLEMENTAL (TRIM_Type *)FLASH0_NVR4_BASE

 

Supplemental trim instance, pointing to NVR4.

 

Location: trim.h:268

 

TRIM_CUSTOM_SIP1_SIGNATURE

#define TRIM_CUSTOM_SIP1_SIGNATURE 0x53495031

 

SiP Signature for NVR6 custom trim calibration.

 

Location: trim.h:271

 

TRIM_CUSTOM_CUST_SIGNATURE

#define TRIM_CUSTOM_CUST_SIGNATURE 0x43555354

 

Custom Signature for NVR6 custom trim calibration.

 

Location: trim.h:274

 

ICH_TRIM_DEFAULT

#define ICH_TRIM_DEFAULT (0x5U)

 

Location: trim.h:277

 

SYS_TRIM_LOAD_DEFAULT

#define SYS_TRIM_LOAD_DEFAULT Sys_Trim_LoadTrims(TRIM, trim_args1, trim_args2)

 

Load default trim values from NVR7.

 

Location: trim.h:520

 


Return


A code indicating whether an error has occurred. Error codes: errors

 

 

Example Code for SYS_TRIM_LOAD_DEFAULT

    // Load all valid default trim values from MNVR/NVR7 for 

    // power rails and oscillators

    result = SYS_TRIM_LOAD_DEFAULT();

 

SYS_TRIM_LOAD_SUPPLEMENTAL

#define SYS_TRIM_LOAD_SUPPLEMENTAL Sys_Trim_LoadTrims(TRIM_SUPPLEMENTAL,x,y)

 

Load supplemental trim values from NVR4.

 

Location: trim.h:536

 

Parameters

Direction Name Description

in

x

uint32_t[6] containing targets in this order: DCDC, VDDRF, VDDIF, VDDFLASH, RC 3MHz, RC 32kHz

in

y

uint32_t[4][2] containing targets in this order: Bandgap voltage | Bandgap current VDDC voltage | VDDC standby voltage VDDM voltage | VDDM standby voltage VDDPA voltage | VDDPA minimum voltage

 


Return


A code indicating whether an error has occurred. Error codes: errors

 

NOTE: For detail on input parameters, see trim_args1 & 2 in trim.c

 

Example Code for SYS_TRIM_LOAD_SUPPLEMENTAL

    // Load the requested supplemental trim values

    result = SYS_TRIM_LOAD_DEFAULT();

 

SYS_TRIM_LOAD_CUSTOM

#define SYS_TRIM_LOAD_CUSTOM Sys_Trim_LoadCustom()

 

Load custom trim values from NVR6.

 

Location: trim.h:544

 


Return


A code indicating whether an error has occurred. Error codes: errors

 

 

Example Code for SYS_TRIM_LOAD_CUSTOM

    // Load all valid custom trim values from NVR6

    result = SYS_TRIM_LOAD_CUSTOM()