|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Encoder configuration register (ENCMODE) More...
#include <tmc51x0_registers.hpp>
Public Attributes | ||
| uint32_t | value | |
| struct { | ||
| uint32_t pol_A: 1 | ||
| uint32_t pol_B: 1 | ||
| uint32_t pol_N: 1 | ||
| uint32_t ignore_AB: 1 | ||
| Bit 3: Ignore A and B polarity for N channel event. More... | ||
| uint32_t clr_cont: 1 | ||
| uint32_t clr_once: 1 | ||
| uint32_t pos_edge: 1 | ||
| Bit 6: N channel event sensitivity (positive edge) More... | ||
| uint32_t neg_edge: 1 | ||
| Bit 7: N channel event sensitivity (negative edge) More... | ||
| uint32_t clr_enc_x: 1 | ||
| Bit 8: Clear encoder counter X_ENC upon N-event. More... | ||
| uint32_t latch_x_act: 1 | ||
| uint32_t enc_sel_decimal: 1 | ||
| uint32_t reserved: 21 | ||
| Reserved bits (11..31) More... | ||
| } | bits | |
Encoder configuration register (ENCMODE)
Configuration for encoder interface and N channel event handling.
Bit assignments per datasheet:
| struct { ... } tmc51x0::ENCMODE_Register::bits |
| uint32_t tmc51x0::ENCMODE_Register::clr_cont |
Bit 4: Always latch or latch and clear X_ENC upon an N event
| uint32_t tmc51x0::ENCMODE_Register::clr_enc_x |
Bit 8: Clear encoder counter X_ENC upon N-event.
| uint32_t tmc51x0::ENCMODE_Register::clr_once |
Bit 5: Latch or latch and clear X_ENC on the next N event following the write access
| uint32_t tmc51x0::ENCMODE_Register::enc_sel_decimal |
Bit 10: Encoder prescaler divisor (0=binary, 1=decimal)
| uint32_t tmc51x0::ENCMODE_Register::ignore_AB |
Bit 3: Ignore A and B polarity for N channel event.
| uint32_t tmc51x0::ENCMODE_Register::latch_x_act |
Bit 9: Also latch XACTUAL position together with X_ENC
| uint32_t tmc51x0::ENCMODE_Register::neg_edge |
Bit 7: N channel event sensitivity (negative edge)
| uint32_t tmc51x0::ENCMODE_Register::pol_A |
Bit 0: Required A polarity for an N channel event (0=neg., 1=pos.)
| uint32_t tmc51x0::ENCMODE_Register::pol_B |
Bit 1: Required B polarity for an N channel event (0=neg., 1=pos.)
| uint32_t tmc51x0::ENCMODE_Register::pol_N |
Bit 2: Defines active polarity of N (0=low active, 1=high active)
| uint32_t tmc51x0::ENCMODE_Register::pos_edge |
Bit 6: N channel event sensitivity (positive edge)
| uint32_t tmc51x0::ENCMODE_Register::reserved |
Reserved bits (11..31)
| uint32_t tmc51x0::ENCMODE_Register::value |