HF-AS5047U Driver  0.1.0-dev
HF-AS5047U C++ Driver
Loading...
Searching...
No Matches
AS5047U_REG::ECC Struct Reference

ECCECC Settings register (0x001B, default 0x0000) More...

#include <as5047u_registers.hpp>

Public Types

enum class  ECCMode : uint8_t { Disabled = 0 , Enabled = 1 }
 ECC enable/disable (ECC_en bit) More...
 

Public Attributes

union { 
 
   uint16_t   value 
 
   struct { 
 
      uint16_t   ECC_chsum: 7 
 
      uint16_t   ECC_en: 1 
 
      uint16_t   reserved_8_15: 8 
 
   }   bits 
 
};  
 

Static Public Attributes

static constexpr uint16_t ADDRESS = 0x001B
 

Detailed Description

ECCECC Settings register (0x001B, default 0x0000)

Bits Name R/W/P Description
0-6 ECC_chsum R/W/P ECC checksum bits (7-bit ECC for OTP content)
7 ECC_en R/W/P Enable ECC protection (0 = disable, 1 = enable ECC)
8-15 (unused) - Unused upper bits (reads 0)

This register holds the Error-Correcting Code (ECC) for the OTP registers. To protect the custom settings, set ECC_en=1 and then program the ECC_chsum with the correct checksum before burning OTP. The 7-bit ECC checksum must be computed (read from address 0x3FD0/ECC_Checksum after enabling ECC) and written here prior to final OTP programming.

Member Enumeration Documentation

◆ ECCMode

enum class AS5047U_REG::ECC::ECCMode : uint8_t
strong

ECC enable/disable (ECC_en bit)

Enumerator
Disabled 

ECC disabled (default)

Enabled 

ECC enabled (protects OTP content)

Member Data Documentation

◆ [union]

union { ... } AS5047U_REG::ECC

◆ ADDRESS

constexpr uint16_t AS5047U_REG::ECC::ADDRESS = 0x001B
staticconstexpr

◆ [struct]

struct { ... } AS5047U_REG::ECC::bits

◆ ECC_chsum

uint16_t AS5047U_REG::ECC::ECC_chsum

◆ ECC_en

uint16_t AS5047U_REG::ECC::ECC_en

◆ reserved_8_15

uint16_t AS5047U_REG::ECC::reserved_8_15

◆ value

uint16_t AS5047U_REG::ECC::value

The documentation for this struct was generated from the following file: