Started Implementing UART Register interface
This commit is contained in:
@@ -382,10 +382,93 @@ struct REG_MSCURACT {
|
||||
|
||||
struct REG_CHOPCONF {
|
||||
/**
|
||||
* (Reset default: OTP)
|
||||
* Chopper control register
|
||||
* @brief off time and driver enable
|
||||
* Off time setting controls duration of slow decay phase
|
||||
* NCLK= 24 + 32*TOFF
|
||||
* %0000: Driver disable, all bridges off
|
||||
* %0001: 1 – use only with TBL ≥ 2
|
||||
* %0010 ... %1111: 2 ... 15
|
||||
* (Default: OTP, resp. 3 in StealthChop mode)
|
||||
*/
|
||||
unsigned int chopconf: 32;
|
||||
unsigned int toff: 4;
|
||||
|
||||
/**
|
||||
* @brief hysteresis start value added to HEND
|
||||
* %000 ... %111:
|
||||
* Add 1, 2, ..., 8 to hysteresis low value HEND
|
||||
* (1/512 of this setting adds to current setting)
|
||||
* Attention: Effective HEND+HSTRT ≤ 16.
|
||||
* Hint: Hysteresis decrement is done each 16 clocks
|
||||
*/
|
||||
unsigned int hstrt: 3;
|
||||
|
||||
/**
|
||||
* @brief HEND hysteresis low value OFFSET sine wave offset
|
||||
* %0000 ... %1111:
|
||||
* Hysteresis is -3, -2, -1, 0, 1, ..., 12
|
||||
* (1/512 of this setting adds to current setting)
|
||||
* This is the hysteresis value which becomes used for the hysteresis chopper.
|
||||
* (Default: OTP, resp. 0 in StealthChop mode)
|
||||
*/
|
||||
unsigned int hend: 4;
|
||||
|
||||
unsigned int :1;
|
||||
|
||||
/**
|
||||
* @brief TBL blank time select
|
||||
* %00 ... %11:
|
||||
* Set comparator blank time to 16, 24, 32 or 40 clocks
|
||||
* Hint: %00 or %01 is recommended for most applications
|
||||
* (Default: OTP)
|
||||
*/
|
||||
unsigned int tbl: 2;
|
||||
|
||||
/**
|
||||
* @brief sense resistor voltage based current scaling
|
||||
* 0: Low sensitivity, high sense resistor voltage
|
||||
* 1: High sensitivity, low sense resistor voltage
|
||||
*/
|
||||
unsigned int vsense: 1;
|
||||
|
||||
unsigned int :6;
|
||||
|
||||
/**
|
||||
* @brief micro step resolution
|
||||
* %0000: Native 256 microstep setting.
|
||||
* %0001 ... %1000:
|
||||
* 128, 64, 32, 16, 8, 4, 2, FULLSTEP
|
||||
* Reduced microstep resolution.
|
||||
* The resolution gives the number of microstep entries per sine quarter wave.
|
||||
* When choosing a lower microstep resolution, the driver automatically uses microstep positions which result in a symmetrical wave.
|
||||
* Number of microsteps per step pulse = 2^MRES (Selection by pins unless disabled by GCONF. mstep_reg_select)
|
||||
*/
|
||||
unsigned int mres: 4;
|
||||
|
||||
/**
|
||||
* @brief interpolation to 256 microsteps
|
||||
* 1: The actual microstep resolution (MRES) becomes extrapolated to 256 microsteps for smoothest motor operation. (Default: 1)
|
||||
*/
|
||||
unsigned int intpol: 1;
|
||||
|
||||
/**
|
||||
* @brief enable double edge step pulses
|
||||
* 1: Enable step impulse at each step edge to reduce step frequency requirement. This mode is not compatible with the step filtering function (multistep_filt)
|
||||
*/
|
||||
unsigned int dedge: 1;
|
||||
|
||||
/**
|
||||
* @brief short to GND protection disable
|
||||
* 0: Short to GND protection is on
|
||||
* 1: Short to GND protection is disabled
|
||||
*/
|
||||
unsigned int diss2g: 1;
|
||||
|
||||
/**
|
||||
* @brief Low side short protection disable
|
||||
* 0: Short protection low side is on
|
||||
* 1: Short protection low side is disabled
|
||||
*/
|
||||
unsigned int diss2vs: 1;
|
||||
};
|
||||
|
||||
struct DRV_STATUS {
|
||||
|
||||
Reference in New Issue
Block a user