TMC7300
Loading...
Searching...
No Matches
TMC7300_Map.h
Go to the documentation of this file.
1#ifndef TMC7300_MAP_H
2#define TMC7300_MAP_H
3
4#include "TMC7300_Register.h"
5#include "TMC_Field.h"
6
7// modified from https://github.com/bread-wolf/TMCField/blob/7c4b964b48f24d1abf9723590ade0b018836ea6b/TMC7300/TMC7300_Map.cpp
8
9// clang-format off
10/* GCONF Register fields */
11TMCField TMC7300_PWM_DIRECT (_TMC7300_GCONF, _TMC7300_PWM_DIRECT_MASK, _TMC7300_PWM_DIRECT_SHIFT, _TMC7300_GCONF_VALUE_ADDR);
12TMCField TMC7300_EXTCAP (_TMC7300_GCONF, _TMC7300_EXTCAP_MASK, _TMC7300_EXTCAP_SHIFT, _TMC7300_GCONF_VALUE_ADDR);
13TMCField TMC7300_PAR_MODE (_TMC7300_GCONF, _TMC7300_PAR_MODE_MASK, _TMC7300_PAR_MODE_SHIFT, _TMC7300_GCONF_VALUE_ADDR);
14TMCField TMC7300_TEST_MODE (_TMC7300_GCONF, _TMC7300_TEST_MODE_MASK, _TMC7300_TEST_MODE_SHIFT, _TMC7300_GCONF_VALUE_ADDR);
15
16/* GSTAT Register fields */
17TMCField TMC7300_RESET (_TMC7300_GSTAT, _TMC7300_RESET_MASK, _TMC7300_RESET_SHIFT, _TMC7300_GSTAT_VALUE_ADDR);
18TMCField TMC7300_DRV_ERR (_TMC7300_GSTAT, _TMC7300_DRV_ERR_MASK, _TMC7300_DRV_ERR_SHIFT, _TMC7300_GSTAT_VALUE_ADDR);
19TMCField TMC7300_U3V5 (_TMC7300_GSTAT, _TMC7300_U3V5_MASK, _TMC7300_U3V5_SHIFT, _TMC7300_GSTAT_VALUE_ADDR);
20
21/* IFCNT Register */
22TMCField TMC7300_IFCNT (_TMC7300_IFCNT, _TMC7300_IFCNT_MASK, _TMC7300_IFCNT_SHIFT, _TMC7300_IFCNT_VALUE_ADDR);
23
24/* Send Delay register */
25TMCField TMC7300_SLAVECONF (_TMC7300_SLAVECONF, _TMC7300_SLAVECONF_MASK, _TMC7300_SLAVECONF_SHIFT, _TMC7300_SLAVECONF_VALUE_ADDR);
26
27/* IOIN Register fields */
28TMCField TMC7300_EN (_TMC7300_IOIN, _TMC7300_EN_MASK, _TMC7300_EN_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
29TMCField TMC7300_NSTDBY (_TMC7300_IOIN, _TMC7300_NSTDBY_MASK, _TMC7300_NSTDBY_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
30TMCField TMC7300_AD0 (_TMC7300_IOIN, _TMC7300_AD0_MASK, _TMC7300_AD0_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
31TMCField TMC7300_AD1 (_TMC7300_IOIN, _TMC7300_AD1_MASK, _TMC7300_AD1_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
32TMCField TMC7300_DIAG (_TMC7300_IOIN, _TMC7300_DIAG_MASK, _TMC7300_DIAG_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
33TMCField TMC7300_UART_ENABLED (_TMC7300_IOIN, _TMC7300_UART_ENABLED_MASK, _TMC7300_UART_ENABLED_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
34TMCField TMC7300_UART_INPUT (_TMC7300_IOIN, _TMC7300_UART_INPUT_MASK, _TMC7300_UART_INPUT_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
35TMCField TMC7300_MODE_INPUT (_TMC7300_IOIN, _TMC7300_MODE_INPUT_MASK, _TMC7300_MODE_INPUT_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
36TMCField TMC7300_A2 (_TMC7300_IOIN, _TMC7300_A2_MASK, _TMC7300_A2_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
37TMCField TMC7300_A1 (_TMC7300_IOIN, _TMC7300_A1_MASK, _TMC7300_A1_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
38TMCField TMC7300_COMP_A1A2 (_TMC7300_IOIN, _TMC7300_COMP_A1A2_MASK, _TMC7300_COMP_A1A2_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
39TMCField TMC7300_COMP_B1B2 (_TMC7300_IOIN, _TMC7300_COMP_B1B2_MASK, _TMC7300_COMP_B1B2_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
40TMCField TMC7300_VERSION (_TMC7300_IOIN, _TMC7300_VERSION_MASK, _TMC7300_VERSION_SHIFT, _TMC7300_IOIN_VALUE_ADDR);
41
42/* CURRENT_LIMIT Register fields */
43TMCField TMC7300_MOTORRUN (_TMC7300_CURRENT_LIMIT, _TMC7300_MOTORRUN_MASK, _TMC7300_MOTORRUN_SHIFT, _TMC7300_CURRENT_LIMIT_VALUE_ADDR);
44TMCField TMC7300_IRUN (_TMC7300_CURRENT_LIMIT, _TMC7300_IRUN_MASK, _TMC7300_IRUN_SHIFT, _TMC7300_CURRENT_LIMIT_VALUE_ADDR);
45
46/* PWM_AB Register fields */
47TMCField TMC7300_PWM_A (_TMC7300_PWM_AB, _TMC7300_PWM_A_MASK, _TMC7300_PWM_A_SHIFT, _TMC7300_PWM_AB_VALUE_ADDR);
48TMCField TMC7300_PWM_B (_TMC7300_PWM_AB, _TMC7300_PWM_B_MASK, _TMC7300_PWM_B_SHIFT, _TMC7300_PWM_AB_VALUE_ADDR);
49
50/* CHOPCONF Register fields */
51TMCField TMC7300_DISS2VS (_TMC7300_CHOPCONF, _TMC7300_DISS2VS_MASK, _TMC7300_DISS2VS_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR);
52TMCField TMC7300_DISS2G (_TMC7300_CHOPCONF, _TMC7300_DISS2G_MASK, _TMC7300_DISS2G_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR);
53TMCField TMC7300_TBL (_TMC7300_CHOPCONF, _TMC7300_TBL_MASK, _TMC7300_TBL_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR);
54TMCField TMC7300_ENABLEDRV (_TMC7300_CHOPCONF, _TMC7300_ENABLEDRV_MASK, _TMC7300_ENABLEDRV_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR);
55
56/* PWMCONF Register fields */
57TMCField TMC7300_FREEWHEEL (_TMC7300_PWMCONF, _TMC7300_FREEWHEEL_MASK, _TMC7300_FREEWHEEL_SHIFT, _TMC7300_PWMCONF_VALUE_ADDR);
58TMCField TMC7300_PWM_FREQ (_TMC7300_PWMCONF, _TMC7300_PWM_FREQ_MASK, _TMC7300_PWM_FREQ_SHIFT, _TMC7300_PWMCONF_VALUE_ADDR);
59
60/* DRVSTATUS Register Fields */
61TMCField TMC7300_T150 (_TMC7300_DRVSTATUS, _TMC7300_T150_MASK, _TMC7300_T150_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
62TMCField TMC7300_T120 (_TMC7300_DRVSTATUS, _TMC7300_T120_MASK, _TMC7300_T120_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
63TMCField TMC7300_LIB (_TMC7300_DRVSTATUS, _TMC7300_OLB_MASK, _TMC7300_OLB_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
64TMCField TMC7300_LIA (_TMC7300_DRVSTATUS, _TMC7300_OLA_MASK, _TMC7300_OLA_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
65TMCField TMC7300_S2VSB (_TMC7300_DRVSTATUS, _TMC7300_S2VSB_MASK, _TMC7300_S2VSB_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
66TMCField TMC7300_S2VSA (_TMC7300_DRVSTATUS, _TMC7300_S2VSA_MASK, _TMC7300_S2VSA_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
67TMCField TMC7300_S2GB (_TMC7300_DRVSTATUS, _TMC7300_S2GB_MASK, _TMC7300_S2GB_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
68TMCField TMC7300_S2GA (_TMC7300_DRVSTATUS, _TMC7300_S2GA_MASK, _TMC7300_S2GA_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
69TMCField TMC7300_OT (_TMC7300_DRVSTATUS, _TMC7300_OT_MASK, _TMC7300_OT_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
70TMCField TMC7300_OTPW (_TMC7300_DRVSTATUS, _TMC7300_OTPW_MASK, _TMC7300_OTPW_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR);
71
72// clang-format on
73
74#endif // TMC7300_MAP_H
TMCField TMC7300_UART_ENABLED(_TMC7300_IOIN, _TMC7300_UART_ENABLED_MASK, _TMC7300_UART_ENABLED_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_LIA(_TMC7300_DRVSTATUS, _TMC7300_OLA_MASK, _TMC7300_OLA_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_S2VSA(_TMC7300_DRVSTATUS, _TMC7300_S2VSA_MASK, _TMC7300_S2VSA_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_IRUN(_TMC7300_CURRENT_LIMIT, _TMC7300_IRUN_MASK, _TMC7300_IRUN_SHIFT, _TMC7300_CURRENT_LIMIT_VALUE_ADDR)
TMCField TMC7300_VERSION(_TMC7300_IOIN, _TMC7300_VERSION_MASK, _TMC7300_VERSION_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_AD0(_TMC7300_IOIN, _TMC7300_AD0_MASK, _TMC7300_AD0_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_DRV_ERR(_TMC7300_GSTAT, _TMC7300_DRV_ERR_MASK, _TMC7300_DRV_ERR_SHIFT, _TMC7300_GSTAT_VALUE_ADDR)
TMCField TMC7300_S2GB(_TMC7300_DRVSTATUS, _TMC7300_S2GB_MASK, _TMC7300_S2GB_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_T150(_TMC7300_DRVSTATUS, _TMC7300_T150_MASK, _TMC7300_T150_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_A1(_TMC7300_IOIN, _TMC7300_A1_MASK, _TMC7300_A1_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_A2(_TMC7300_IOIN, _TMC7300_A2_MASK, _TMC7300_A2_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_MODE_INPUT(_TMC7300_IOIN, _TMC7300_MODE_INPUT_MASK, _TMC7300_MODE_INPUT_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_IFCNT(_TMC7300_IFCNT, _TMC7300_IFCNT_MASK, _TMC7300_IFCNT_SHIFT, _TMC7300_IFCNT_VALUE_ADDR)
TMCField TMC7300_FREEWHEEL(_TMC7300_PWMCONF, _TMC7300_FREEWHEEL_MASK, _TMC7300_FREEWHEEL_SHIFT, _TMC7300_PWMCONF_VALUE_ADDR)
TMCField TMC7300_AD1(_TMC7300_IOIN, _TMC7300_AD1_MASK, _TMC7300_AD1_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_EN(_TMC7300_IOIN, _TMC7300_EN_MASK, _TMC7300_EN_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_PAR_MODE(_TMC7300_GCONF, _TMC7300_PAR_MODE_MASK, _TMC7300_PAR_MODE_SHIFT, _TMC7300_GCONF_VALUE_ADDR)
TMCField TMC7300_PWM_B(_TMC7300_PWM_AB, _TMC7300_PWM_B_MASK, _TMC7300_PWM_B_SHIFT, _TMC7300_PWM_AB_VALUE_ADDR)
TMCField TMC7300_OT(_TMC7300_DRVSTATUS, _TMC7300_OT_MASK, _TMC7300_OT_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_OTPW(_TMC7300_DRVSTATUS, _TMC7300_OTPW_MASK, _TMC7300_OTPW_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_COMP_B1B2(_TMC7300_IOIN, _TMC7300_COMP_B1B2_MASK, _TMC7300_COMP_B1B2_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_TBL(_TMC7300_CHOPCONF, _TMC7300_TBL_MASK, _TMC7300_TBL_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR)
TMCField TMC7300_PWM_DIRECT(_TMC7300_GCONF, _TMC7300_PWM_DIRECT_MASK, _TMC7300_PWM_DIRECT_SHIFT, _TMC7300_GCONF_VALUE_ADDR)
TMCField TMC7300_T120(_TMC7300_DRVSTATUS, _TMC7300_T120_MASK, _TMC7300_T120_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_U3V5(_TMC7300_GSTAT, _TMC7300_U3V5_MASK, _TMC7300_U3V5_SHIFT, _TMC7300_GSTAT_VALUE_ADDR)
TMCField TMC7300_DISS2VS(_TMC7300_CHOPCONF, _TMC7300_DISS2VS_MASK, _TMC7300_DISS2VS_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR)
TMCField TMC7300_RESET(_TMC7300_GSTAT, _TMC7300_RESET_MASK, _TMC7300_RESET_SHIFT, _TMC7300_GSTAT_VALUE_ADDR)
TMCField TMC7300_PWM_FREQ(_TMC7300_PWMCONF, _TMC7300_PWM_FREQ_MASK, _TMC7300_PWM_FREQ_SHIFT, _TMC7300_PWMCONF_VALUE_ADDR)
TMCField TMC7300_DISS2G(_TMC7300_CHOPCONF, _TMC7300_DISS2G_MASK, _TMC7300_DISS2G_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR)
TMCField TMC7300_S2GA(_TMC7300_DRVSTATUS, _TMC7300_S2GA_MASK, _TMC7300_S2GA_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_DIAG(_TMC7300_IOIN, _TMC7300_DIAG_MASK, _TMC7300_DIAG_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_TEST_MODE(_TMC7300_GCONF, _TMC7300_TEST_MODE_MASK, _TMC7300_TEST_MODE_SHIFT, _TMC7300_GCONF_VALUE_ADDR)
TMCField TMC7300_COMP_A1A2(_TMC7300_IOIN, _TMC7300_COMP_A1A2_MASK, _TMC7300_COMP_A1A2_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_MOTORRUN(_TMC7300_CURRENT_LIMIT, _TMC7300_MOTORRUN_MASK, _TMC7300_MOTORRUN_SHIFT, _TMC7300_CURRENT_LIMIT_VALUE_ADDR)
TMCField TMC7300_NSTDBY(_TMC7300_IOIN, _TMC7300_NSTDBY_MASK, _TMC7300_NSTDBY_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_PWM_A(_TMC7300_PWM_AB, _TMC7300_PWM_A_MASK, _TMC7300_PWM_A_SHIFT, _TMC7300_PWM_AB_VALUE_ADDR)
TMCField TMC7300_UART_INPUT(_TMC7300_IOIN, _TMC7300_UART_INPUT_MASK, _TMC7300_UART_INPUT_SHIFT, _TMC7300_IOIN_VALUE_ADDR)
TMCField TMC7300_SLAVECONF(_TMC7300_SLAVECONF, _TMC7300_SLAVECONF_MASK, _TMC7300_SLAVECONF_SHIFT, _TMC7300_SLAVECONF_VALUE_ADDR)
TMCField TMC7300_LIB(_TMC7300_DRVSTATUS, _TMC7300_OLB_MASK, _TMC7300_OLB_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_S2VSB(_TMC7300_DRVSTATUS, _TMC7300_S2VSB_MASK, _TMC7300_S2VSB_SHIFT, _TMC7300_DRVSTATUS_VALUE_ADDR)
TMCField TMC7300_ENABLEDRV(_TMC7300_CHOPCONF, _TMC7300_ENABLEDRV_MASK, _TMC7300_ENABLEDRV_SHIFT, _TMC7300_CHOPCONF_VALUE_ADDR)
TMCField TMC7300_EXTCAP(_TMC7300_GCONF, _TMC7300_EXTCAP_MASK, _TMC7300_EXTCAP_SHIFT, _TMC7300_GCONF_VALUE_ADDR)
Definition TMC_Field.h:7