|
HF-AS5047U Driver
0.1.0-dev
HF-AS5047U C++ Driver
|
SETTINGS2 – Custom setting register 2 (0x0019, default 0x0000) More...
#include <as5047u_registers.hpp>
Public Types | |
| enum class | IndexWidth : uint8_t { Width3LSB = 0 , Width1LSB = 1 } |
| Index pulse width options (IWIDTH bit) More... | |
| enum class | NoiseSetting : uint8_t { Normal = 0 , HighTemp = 1 } |
| High-temperature noise reduction setting (NOISESET bit) More... | |
| enum class | RotationDirection : uint8_t { Normal = 0 , Inverted = 1 } |
| Rotation direction setting (DIR bit) – defines incremental output phase sense. More... | |
| enum class | OutputInterfaceMode : uint8_t { ABI_PWM_on_W = 0 , UVW_PWM_on_I = 1 } |
| Output interface selection for ABI vs UVW and PWM mapping (UVW_ABI bit) More... | |
| enum class | DynamicCompensation : uint8_t { Enabled = 0 , Disabled = 1 } |
| Dynamic angle error compensation (DAEC) mode (DAECDIS bit) More... | |
| enum class | ABICountMode : uint8_t { Binary = 0 , Decimal = 1 } |
| ABI resolution counting mode (ABI_DEC bit) – binary vs decimal pulses per revolution. More... | |
| enum class | AngleOutputSource : uint8_t { UseANGLECOM = 0 , UseANGLEUNC = 1 } |
| Angle data source for 0x3FFF output (Data_select bit) More... | |
| enum class | PWMMode : uint8_t { Disabled = 0 , Enabled = 1 } |
| PWM output enable (PWMon bit) More... | |
Public Attributes | ||
| union { | ||
| uint16_t value | ||
| struct { | ||
| uint16_t IWIDTH: 1 | ||
| uint16_t NOISESET: 1 | ||
| uint16_t DIR: 1 | ||
| uint16_t UVW_ABI: 1 | ||
| uint16_t DAECDIS: 1 | ||
| uint16_t ABI_DEC: 1 | ||
| uint16_t Data_select: 1 | ||
| uint16_t PWMon: 1 | ||
| uint16_t reserved_8_15: 8 | ||
| } bits | ||
| }; | ||
Static Public Attributes | |
| static constexpr uint16_t | ADDRESS = 0x0019 |
SETTINGS2 – Custom setting register 2 (0x0019, default 0x0000)
| Bits | Name | R/W/P | Description |
|---|---|---|---|
| 0 | IWIDTH | R/W/P | Index pulse width (0: 3 LSB pulses (default), 1: 1 LSB pulse) |
| 1 | NOISESET | R/W/P | Noise setting for 3.3V operation at 150°C (0: Normal noise, |
| | | 1: Reduced noise) 2 | DIR | R/W/P | Rotation direction setting (0: CW default, 1: Invert direction) 3 | UVW_ABI | R/W/P | Select ABI or UVW interface for outputs and PWM (0: ABI active, | | | PWM on W; 1: UVW active, PWM on I) 4 | DAECDIS | R/W/P | Dynamic angle error compensation disable (0: DAEC on (default), | | | 1: DAEC off) 5 | ABI_DEC | R/W/P | ABI decimal count enable (0: Binary resolution, 1: Decimal pulses | | | per revolution) 6 | Data_select | R/W/P | Selects angle data at 0x3FFF (0: ANGLECOM, 1: ANGLEUNC readout) 7 | PWMon | R/W/P | PWM output enable (0: PWM disabled, 1: PWM enabled) 8-15 | (unused) | - | Unused upper bits (reads 0)
This register configures various interface options. IWIDTH sets the index pulse width in the ABI interface. DIR inverts the direction of the incremental signals (defines rotation direction as clockwise when DIR=0). UVW_ABI selects which incremental interface is active and which pin outputs the PWM signal. Setting DAECDIS=1 disables dynamic angle error compensation (the angle outputs will be raw). ABI_DEC=1 selects a decimal pulse count per revolution (e.g., 1000 ppr) instead of binary powers of two. Data_select controls whether the 0x3FFF address returns the compensated or uncompensated angle. PWM output must be enabled (PWMon=1) and mapped via UVW_ABI.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| union { ... } AS5047U_REG::SETTINGS2 |
| uint16_t AS5047U_REG::SETTINGS2::ABI_DEC |
|
staticconstexpr |
| struct { ... } AS5047U_REG::SETTINGS2::bits |
| uint16_t AS5047U_REG::SETTINGS2::DAECDIS |
| uint16_t AS5047U_REG::SETTINGS2::Data_select |
| uint16_t AS5047U_REG::SETTINGS2::DIR |
| uint16_t AS5047U_REG::SETTINGS2::IWIDTH |
| uint16_t AS5047U_REG::SETTINGS2::NOISESET |
| uint16_t AS5047U_REG::SETTINGS2::PWMon |
| uint16_t AS5047U_REG::SETTINGS2::reserved_8_15 |
| uint16_t AS5047U_REG::SETTINGS2::UVW_ABI |
| uint16_t AS5047U_REG::SETTINGS2::value |