35 #define IDX_XTARGET 0x00
36 #define IDX_XACTUAL 0x02
39 #define IDX_VTARGET 0x08
40 #define IDX_VACTUAL 0x0A
42 #define IDX_AACTUAL 0x0E
43 #define IDX_AGTAT_ALEAT 0x10
44 #define IDX_PMUL_PDIV 0x12
45 #define IDX_REFCONF_RM 0x14
46 #define IDX_IMASK_IFLAGS 0x16
47 #define IDX_PULSEDIV_RAMPDIV 0x18
48 #define IDX_DX_REFTOLERANCE 0x1A
49 #define IDX_XLATCHED 0x1C
50 #define IDX_USTEP_COUNT_429 0x1E
52 #define IDX_LOW_WORD 0x60
53 #define IDX_HIGH_WORD 0x62
54 #define IDX_COVER_POS_LEN 0x64
55 #define IDX_COVER_DATA 0x66
57 #define IDX_IF_CONFIG_429 0x68
58 #define IDX_POS_COMP_429 0x6A
59 #define IDX_POS_COMP_INT_429 0x6C
60 #define IDX_TYPE_VERSION_429 0x72
62 #define IDX_REF_SWITCHES 0x7c
65 #define TMC429_READ 0x01
79 #define REFSW_LEFT 0x02
80 #define REFSW_RIGHT 0x01
82 #define M0_POS_REACHED 0x01
83 #define M1_POS_REACHED 0x04
84 #define M2_POS_REACHED 0x10
85 #define TMC429_STATUS_CDGW 0x40
86 #define TMC429_STATUS_INT 0x80
88 #define IFLAG_POS_REACHED 0x01
89 #define IFLAG_REF_WRONG 0x02
90 #define IFLAG_REF_MISS 0x04
91 #define IFLAG_STOP 0x08
92 #define IFLAG_STOP_LEFT_LOW 0x10
93 #define IFLAG_STOP_RIGHT_LOW 0x20
94 #define IFLAG_STOP_LEFT_HIGH 0x40
95 #define IFLAG_STOP_RIGHT_HIGH 0x80
97 #define IFCONF_INV_REF 0x0001
98 #define IFCONF_SDO_INT 0x0002
99 #define IFCONF_STEP_HALF 0x0004
100 #define IFCONF_INV_STEP 0x0008
101 #define IFCONF_INV_DIR 0x0010
102 #define IFCONF_EN_SD 0x0020
103 #define IFCONF_POS_COMP_0 0x0000
104 #define IFCONF_POS_COMP_1 0x0040
105 #define IFCONF_POS_COMP_2 0x0080
106 #define IFCONF_POS_COMP_OFF 0x00C0
107 #define IFCONF_EN_REFR 0x0100
void Write429Int(UCHAR Address, int Value)
Write 24 bit value to a TMC429 register.
Definition: TMC429.c:178
void Write429Datagram(UCHAR Address, UCHAR HighByte, UCHAR MidByte, UCHAR LowByte)
TMC429 write access.
Definition: TMC429.c:116
UCHAR Read429SingleByte(UCHAR Address, UCHAR Index)
Read TMC429 register.
Definition: TMC429.c:243
void Set429SwitchMode(UCHAR Axis, UCHAR SwitchMode)
Set the end switch mode.
Definition: TMC429.c:337
void Init429(void)
TMC429 initialization.
Definition: TMC429.c:431
unsigned int UINT
32 bits unsigned
Definition: stepRocker.h:33
void ReadWrite429(UCHAR *Read, UCHAR *Write)
32 bit SPI communication with TMC429
Definition: TMC429.c:54
void Write429Zero(UCHAR Address)
Write zero to a TMC429 register.
Definition: TMC429.c:136
void Write429Bytes(UCHAR Address, UCHAR *Bytes)
TMC429 write access.
Definition: TMC429.c:94
UCHAR Read429Bytes(UCHAR Address, UCHAR *Bytes)
Read TMC429 register.
Definition: TMC429.c:217
int Read429Int(UCHAR Address)
Read TMC429 register (24 bit)
Definition: TMC429.c:289
void Set429RampMode(UCHAR Axis, UCHAR RampMode)
Set the ramping mode of an axis.
Definition: TMC429.c:313
UCHAR SetAMax(UCHAR Motor, UINT AMax)
Set the maximum acceleration.
Definition: TMC429.c:363
unsigned char UCHAR
8 bits unsigned
Definition: stepRocker.h:31
void HardStop(UINT Motor)
Stop a motor immediately.
Definition: TMC429.c:417
int Read429Short(UCHAR Address)
Read TMC429 register (12 bit)
Definition: TMC429.c:264
UCHAR Read429Status(void)
Read TMC429 status byte.
Definition: TMC429.c:200
void Write429Short(UCHAR Address, int Value)
Write 16 bit value to a TMC429 register.
Definition: TMC429.c:157