pub struct FeedbackControlReg(pub u8);
Tuple Fields§
§0: u8
Implementations§
Source§impl FeedbackControlReg
impl FeedbackControlReg
Sourcepub fn n_erm_lra(&self) -> bool
pub fn n_erm_lra(&self) -> bool
This bit sets the DRV2605 device in ERM or LRA mode. This bit should be set prior to running auto calibration. 0: ERM Mode 1: LRA Mode
Sourcepub fn fb_brake_factor(&self) -> u8
pub fn fb_brake_factor(&self) -> u8
This bit selects the feedback gain ratio between braking gain and driving gain. In general, adding additional feedback gain while braking is desirable so that the actuator brakes as quickly as possible. Large ratios provide less-stable operation than lower ones. The advanced user can select to optimize this register. Otherwise, the default value should provide good performance for most actuators. This value should be set prior to running auto calibration. 0: 1x 1: 2x 2: 3x 3: 4x 4: 6x 5: 8x 6: 16x 7: Braking disabled
Sourcepub fn loop_gain(&self) -> u8
pub fn loop_gain(&self) -> u8
This bit selects a loop gain for the feedback control. The LOOP_GAIN[1:0] bit sets how fast the loop attempts to make the back-EMF (and thus motor velocity) match the input signal level. Higher loop-gain (faster settling) options provide less-stable operation than lower loop gain (slower settling). The advanced user can select to optimize this register. Otherwise, the default value should provide good performance for most actuators. This value should be set prior to running auto calibration. 0: Low 1: Medium (default) 2: High 3: Very High
Sourcepub fn bemf_gain(&self) -> u8
pub fn bemf_gain(&self) -> u8
This bit sets the analog gain of the back-EMF amplifier. This value is interpreted differently between ERM mode and LRA mode. Auto calibration automatically populates the BEMF_GAIN bit with the most appropriate value for the actuator. ERM Mode 0: 0.33x 1: 1.0x 2: 1.8x (default) 3: 4.0x LRA Mode 0: 5x 1: 10x 2: 20x (default) 3: 30x
Sourcepub fn set_n_erm_lra(&mut self, value: bool)
pub fn set_n_erm_lra(&mut self, value: bool)
This bit sets the DRV2605 device in ERM or LRA mode. This bit should be set prior to running auto calibration. 0: ERM Mode 1: LRA Mode
Sourcepub fn set_fb_brake_factor(&mut self, value: u8)
pub fn set_fb_brake_factor(&mut self, value: u8)
This bit selects the feedback gain ratio between braking gain and driving gain. In general, adding additional feedback gain while braking is desirable so that the actuator brakes as quickly as possible. Large ratios provide less-stable operation than lower ones. The advanced user can select to optimize this register. Otherwise, the default value should provide good performance for most actuators. This value should be set prior to running auto calibration. 0: 1x 1: 2x 2: 3x 3: 4x 4: 6x 5: 8x 6: 16x 7: Braking disabled
Sourcepub fn set_loop_gain(&mut self, value: u8)
pub fn set_loop_gain(&mut self, value: u8)
This bit selects a loop gain for the feedback control. The LOOP_GAIN[1:0] bit sets how fast the loop attempts to make the back-EMF (and thus motor velocity) match the input signal level. Higher loop-gain (faster settling) options provide less-stable operation than lower loop gain (slower settling). The advanced user can select to optimize this register. Otherwise, the default value should provide good performance for most actuators. This value should be set prior to running auto calibration. 0: Low 1: Medium (default) 2: High 3: Very High
Sourcepub fn set_bemf_gain(&mut self, value: u8)
pub fn set_bemf_gain(&mut self, value: u8)
This bit sets the analog gain of the back-EMF amplifier. This value is interpreted differently between ERM mode and LRA mode. Auto calibration automatically populates the BEMF_GAIN bit with the most appropriate value for the actuator. ERM Mode 0: 0.33x 1: 1.0x 2: 1.8x (default) 3: 4.0x LRA Mode 0: 5x 1: 10x 2: 20x (default) 3: 30x