Function tmc2209::chopper_hz_to_toff[][src]

pub fn chopper_hz_to_toff(fclk: f32, hz: f32) -> Option<u8>
Expand description

Convert the given frequency to the closest TOFF value.

Returns None if the TOFF value would be 0, as this value disables motor.

Note that the TMC only supports a discrete collection of 15 chopper frequencies in the range between 5,952.381hz and 53,571.426hz.