|
HF-AS5047U Driver
0.1.0-dev
HF-AS5047U C++ Driver
|
ECC – ECC 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 |
ECC – ECC 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.
|
strong |
| union { ... } AS5047U_REG::ECC |
|
staticconstexpr |
| struct { ... } AS5047U_REG::ECC::bits |
| uint16_t AS5047U_REG::ECC::ECC_chsum |
| uint16_t AS5047U_REG::ECC::ECC_en |
| uint16_t AS5047U_REG::ECC::reserved_8_15 |
| uint16_t AS5047U_REG::ECC::value |