TMC5160 Driver
API reference
Loading...
Searching...
No Matches
Public Attributes | List of all members
tmc51x0::ENCMODE_Register Union Reference

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 
 

Detailed Description

Encoder configuration register (ENCMODE)

Configuration for encoder interface and N channel event handling.

Bit assignments per datasheet:

Member Data Documentation

◆ [struct]

struct { ... } tmc51x0::ENCMODE_Register::bits

◆ clr_cont

uint32_t tmc51x0::ENCMODE_Register::clr_cont

Bit 4: Always latch or latch and clear X_ENC upon an N event

◆ clr_enc_x

uint32_t tmc51x0::ENCMODE_Register::clr_enc_x

Bit 8: Clear encoder counter X_ENC upon N-event.

◆ clr_once

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

◆ enc_sel_decimal

uint32_t tmc51x0::ENCMODE_Register::enc_sel_decimal

Bit 10: Encoder prescaler divisor (0=binary, 1=decimal)

◆ ignore_AB

uint32_t tmc51x0::ENCMODE_Register::ignore_AB

Bit 3: Ignore A and B polarity for N channel event.

◆ latch_x_act

uint32_t tmc51x0::ENCMODE_Register::latch_x_act

Bit 9: Also latch XACTUAL position together with X_ENC

◆ neg_edge

uint32_t tmc51x0::ENCMODE_Register::neg_edge

Bit 7: N channel event sensitivity (negative edge)

◆ pol_A

uint32_t tmc51x0::ENCMODE_Register::pol_A

Bit 0: Required A polarity for an N channel event (0=neg., 1=pos.)

◆ pol_B

uint32_t tmc51x0::ENCMODE_Register::pol_B

Bit 1: Required B polarity for an N channel event (0=neg., 1=pos.)

◆ pol_N

uint32_t tmc51x0::ENCMODE_Register::pol_N

Bit 2: Defines active polarity of N (0=low active, 1=high active)

◆ pos_edge

uint32_t tmc51x0::ENCMODE_Register::pos_edge

Bit 6: N channel event sensitivity (positive edge)

◆ reserved

uint32_t tmc51x0::ENCMODE_Register::reserved

Reserved bits (11..31)

◆ value

uint32_t tmc51x0::ENCMODE_Register::value

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