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

SETTINGS3 – Custom setting register 3 (0x001A, default 0x0000) More...

#include <as5047u_registers.hpp>

Public Types

enum class  UVWPolePairs : uint8_t {
  PP1 = 0b000 , PP2 = 0b001 , PP3 = 0b010 , PP4 = 0b011 ,
  PP5 = 0b100 , PP6 = 0b101 , PP7 = 0b110 , PP7_ALT = 0b111
}
 UVW pole pair count (UVWPP) options for BLDC commutation. More...
 
enum class  Hysteresis : uint8_t { LSB_1 = 0b00 , LSB_2 = 0b01 , LSB_3 = 0b10 , NONE = 0b11 }
 Incremental output hysteresis (HYS) settings: More...
 
enum class  ABIResolution : uint8_t {
  Code0 = 0b000 , Code1 = 0b001 , Code2 = 0b010 , Code3 = 0b011 ,
  Code4 = 0b100 , Code5 = 0b101 , Code6 = 0b110 , Code7 = 0b111
}
 ABI interface resolution (ABIRES) codes – see description for binary vs decimal mode interpretation. More...
 

Public Attributes

union { 
 
   uint16_t   value 
 
   struct { 
 
      uint16_t   UVWPP: 3 
 
      uint16_t   HYS: 2 
 
      uint16_t   ABIRES: 3 
 
      uint16_t   reserved_8_15: 8 
 
   }   bits 
 
};  
 

Static Public Attributes

static constexpr uint16_t ADDRESS = 0x001A
 

Detailed Description

SETTINGS3 – Custom setting register 3 (0x001A, default 0x0000)

Bits Name R/W/P Description
0-2 UVWPP R/W/P UVW commutation pole pair count (0=1pp up to 6=7pp, 7=7pp)
3-4 HYS R/W/P Incremental output hysteresis setting (see table below)
5-7 ABIRES R/W/P Resolution of ABI interface (incremental resolution code)
8-15 (unused) - Unused upper bits (reads 0)

Hysteresis (HYS) options (for incremental outputs):

  • 00: 1 LSB hysteresis (0.17°) – default
  • 01: 2 LSB hysteresis (0.35°)
  • 10: 3 LSB hysteresis (0.52°)
  • 11: 0 LSB (no hysteresis, outputs may toggle on slightest motion)

The ABIRES field selects the incremental encoder resolution. Its interpretation depends on ABI_DEC (binary or decimal mode). For binary mode (ABI_DEC=0):

  • code 0b000 = 12-bit (4096 steps/1024 pulses per rev, default)
  • 0b001 = 11-bit
  • 0b010 = 10-bit
  • 0b011 = 13-bit
  • 0b100 = 14-bit (16384 steps/4096 ppr, max)
  • Codes 0b101–0b111 are reserved in binary mode (treated as 14-bit max). For decimal mode (ABI_DEC=1): codes map to decimal pulses:
  • 0b000 = 1000 ppr (4000 steps)
  • 0b001 = 500 ppr
  • 0b010 = 400 ppr
  • 0b011 = 300 ppr
  • 0b100 = 200 ppr
  • 0b101 = 100 ppr
  • 0b110 = 50 ppr
  • 0b111 = 25 ppr.

Member Enumeration Documentation

◆ ABIResolution

enum class AS5047U_REG::SETTINGS3::ABIResolution : uint8_t
strong

ABI interface resolution (ABIRES) codes – see description for binary vs decimal mode interpretation.

Enumerator
Code0 

Binary: 4096 steps (1024 ppr, 12-bit) ; Decimal: 4000 steps (1000 ppr)

Code1 

Binary: 2048 steps (512 ppr, 11-bit) ; Decimal: 2000 steps (500 ppr)

Code2 

Binary: 1024 steps (256 ppr, 10-bit) ; Decimal: 1600 steps (400 ppr)

Code3 

Binary: 8192 steps (2048 ppr, 13-bit) ; Decimal: 1200 steps (300 ppr)

Code4 

Binary: 16384 steps (4096 ppr, 14-bit) ; Decimal: 800 steps (200 ppr)

Code5 

(Reserved in binary mode) ; Decimal: 400 steps (100 ppr)

Code6 

(Reserved in binary mode) ; Decimal: 200 steps (50 ppr)

Code7 

(Reserved in binary mode) ; Decimal: 100 steps (25 ppr)

◆ Hysteresis

enum class AS5047U_REG::SETTINGS3::Hysteresis : uint8_t
strong

Incremental output hysteresis (HYS) settings:

Enumerator
LSB_1 

1 LSB hysteresis (default, ~0.17°)

LSB_2 

2 LSB hysteresis (~0.35°)

LSB_3 

3 LSB hysteresis (~0.52°)

NONE 

0 LSB hysteresis (no hysteresis)

◆ UVWPolePairs

enum class AS5047U_REG::SETTINGS3::UVWPolePairs : uint8_t
strong

UVW pole pair count (UVWPP) options for BLDC commutation.

Enumerator
PP1 

1 pole pair (default)

PP2 

2 pole pairs

PP3 

3 pole pairs

PP4 

4 pole pairs

PP5 

5 pole pairs

PP6 

6 pole pairs

PP7 

7 pole pairs (also for code 0b111)

PP7_ALT 

7 pole pairs (alternate code, same as 0b110)

Member Data Documentation

◆ [union]

union { ... } AS5047U_REG::SETTINGS3

◆ ABIRES

uint16_t AS5047U_REG::SETTINGS3::ABIRES

◆ ADDRESS

constexpr uint16_t AS5047U_REG::SETTINGS3::ADDRESS = 0x001A
staticconstexpr

◆ [struct]

struct { ... } AS5047U_REG::SETTINGS3::bits

◆ HYS

uint16_t AS5047U_REG::SETTINGS3::HYS

◆ reserved_8_15

uint16_t AS5047U_REG::SETTINGS3::reserved_8_15

◆ UVWPP

uint16_t AS5047U_REG::SETTINGS3::UVWPP

◆ value

uint16_t AS5047U_REG::SETTINGS3::value

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