Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to switch off stealthChop mode in library for TMC2209? #296

Open
dmitryBorisenkoXioneer opened this issue Mar 6, 2024 · 0 comments
Open

Comments

@dmitryBorisenkoXioneer
Copy link

dmitryBorisenkoXioneer commented Mar 6, 2024

Please help me to find way to switch off stealthChop mode for TMC2209.

Driver working in UART mode.

My code initialization part:

 TMCdriver->begin();                                              // UART: Init SW UART (if selected) with default 115200 baudrate
 TMCdriver->toff(5);                                               // off time and driver enable
 TMCdriver->rms_current(_params.CURRENT_);    // Set motor RMS current
 TMCdriver->microsteps(_params.MICROSTEP_);  // Set microsteps
 TMCdriver->shaft(false);                                       // SET DIRECTION
 TMCdriver->en_spreadCycle(false);                      // SpreadCycle™ - highly dynamic motor control chopper
 TMCdriver->pwm_autoscale(true);                       // two modes of PWM regulation, Needed for stealthChop
struct driverParams {
    uint8_t EN_PIN_ = 40;
    uint8_t DRIVER_ADDRESS_ = 0b00;
    float R_SENSE_ = 0.11;  // The current sense resistor
    int CURRENT_ = 2000;
    uint8_t MICROSTEP_ = 2;  // 1/2, 1/4, 1/8, 1/16 - going up - less torque power, more precision
    float MAX_RPS_ = 4;
    float STEP_RPS_ = 0.05;
    int STEP_PAUSE_ = 100;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant