|
using | PowerMode_t = Configuration< Config_t, PowerMode, 0b11, 0 > |
|
using | Hysteresis_t = Configuration< Config_t, Hysteresis, 0b11, 2 > |
|
using | OutputStage_t = Configuration< Config_t, OutputStage, 0b11, 4 > |
|
using | PWMFrequency_t = Configuration< Config_t, PWMFrequency, 0b11, 6 > |
|
using | SlowFilter_t = Configuration< Config_t, SlowFilter, 0b11, 8 > |
|
using | FastFilterThreshold_t = Configuration< Config_t, FastFilterThreshold, 0b11, 10 > |
|
using | Data = modm::IntegerAngle< 12 > |
|
|
enum | Register : uint8_t {
ZMCO = 0x00,
ZPOS = 0x01,
MPOS = 0x03,
MANG = 0x05,
CONF = 0x07,
ANGLE_RAW = 0x0C,
ANGLE = 0x0E,
STATUS = 0x0B,
AGC = 0x1A,
MAGNITUDE = 0x1B,
BURN = 0xFF,
I2C_ADDR = 0x20,
I2C_UPDT = 0x21
} |
|
enum | Config : uint16_t {
PM0 = Bit0,
PM1 = Bit1,
HYST0 = Bit2,
HYST1 = Bit3,
OUTS0 = Bit4,
OUTS1 = Bit5,
PWM0 = Bit6,
PWM1 = Bit7,
SF0 = Bit8,
SF1 = Bit9,
FTH0 = Bit10,
FTH1 = Bit11,
FTH2 = Bit12,
WD = Bit13
} |
|
enum | PowerMode : uint16_t { NOM = 0,
LPM1 = 1,
LPM2 = 2,
LPM3 = 3
} |
|
enum | Hysteresis : uint16_t { OFF = 0,
LSB = 1,
LSB2 = 2,
LSB3 = 3
} |
|
enum | OutputStage : uint16_t { ANALOG = 0,
ANALOG_REDUCED = 1,
PWM = 2
} |
|
enum | PWMFrequency : uint16_t { Hz115 = 0,
Hz230 = 1,
Hz460 = 2,
Hz920 = 3
} |
|
enum | SlowFilter : uint16_t { x16 = 0,
x8 = 1,
x4 = 2,
x2 = 3
} |
|
enum | FastFilterThreshold : uint16_t {
LSB6 = 0,
LSB7 = 1,
LSB9 = 2,
LSB18 = 3,
LSB21 = 4,
LSB24 = 5,
LSB10 = 6
} |
|
enum | Burn : uint8_t { ANGLE = Bit3,
CONFIG = Bit2
} |
|
enum | Status : uint8_t { MagnetTooStrong = Bit3,
MagnetTooWeak = Bit4,
MagnetDetected = Bit5
} |
|
|
int8_t | getResumableDepth () const |
|
bool | isResumableRunning () const |
|
bool | isTransactionRunning () |
|
modm::ResumableResult< bool > | runTransaction () |
| Starts our own transaction and waits until finished.
|
|
bool | startRead (uint8_t *buffer, std::size_t size) |
| Configures the transaction with a read operation and starts it.
|
|
bool | startTransaction () |
| Starts the transaction with our own transaction object.
|
|
bool | startTransaction (modm::I2cTransaction *transaction) |
| Starts the transaction with a separate transaction object.
|
|
bool | startWrite (const uint8_t *buffer, std::size_t size) |
| Configures the transaction with a write operation and starts it.
|
|
bool | startWriteRead (const uint8_t *writeBuffer, std::size_t writeSize, uint8_t *readBuffer, std::size_t readSize) |
| Configures the transaction with a write/read operation and starts it.
|
|
void | stopResumable () |
|
bool | wasTransactionSuccessful () |
|
template<class I2cMaster >
Automated Gain Control
The AS5600 uses Automatic Gain Control in a closed loop to compensate for variations of the magnetic field strength due to changes of temperature, airgap between IC and magnet, and magnet degradation.
For the most robust performance, the gain value should be in the center of its range. The airgap of the physical system can be adjusted to achieve this value.
In 5V operation, range is 0-255 In 3.3V operation, range is reduced to 0-128