0755-82557621 sales@chiplinkstech.com Mon–Fri 09:00–18:00 (UTC+8)
Precision motion control · Components and solutions

How to Use the TMC2130 to Implement Stall Detection (stallGuard)

1. Write register 0x00 (GCONF). 1.1 Enable diag0-stall (when a stall is triggered, diag will output a level signal). 1.2 Select the active high/low level for diag triggering (selectable). 2. Write register 0x10 (I HOLD – I RUN), configure [...]

2020-05-08 Frequently Asked Questions
No cover image

1. Write register 0x00 (GCONF)

1.1 Enable diag0-stall (when a stall is triggered, diag will output a level signal)

The image on the original site is no longer available; awaiting the original file to be supplied.

1.2 Select the active high/low level for diag triggering (selectable)

The image on the original site is no longer available; awaiting the original file to be supplied.

2. Write register 0x10 (I HOLD - I RUN), Configure the motor's standstill current and running current

The image on the original site is no longer available; awaiting the original file to be supplied.

3. Write register 0x14 (TCOOLTHUS),  Configure the enable speed for stall detection (disabled below TCOOLTHUS, enabled above TCOOLTHUS)

The image on the original site is no longer available; awaiting the original file to be supplied.

 

4. Write register 0x6c (CHOPCONF), Configure the microstep resolution

 

5. Write register 0x6D (COOLCONF), Configure the stall detection sensitivity (-64 to +63). Lower values mean higher sensitivity; conversely, higher values mean lower sensitivity.

The image from the original site is no longer available; awaiting the original file.

6. Read register 0x6F (DRV-STATUS)), - Drive status flag register: once stall is triggered, the corresponding flag bit stallGurad is 1,

The image from the original site is no longer available; awaiting the original file.The SG RESULT reading is close to 0.

The image from the original site is no longer available; awaiting the original file.

7. Hardware IO - diag0, diag1, Both can serve as hardware I/O outputs to provide a stall detection signal to the MCU (the active polarity depends on the configuration in step 1 above). When the MCU detects the stall signal, it stops sending pulses and the motor stops, implementing the stall detection function.

The original site image is no longer available; awaiting the original file to be supplied.

Note: The above examples are configuration methods for when stealthChop mode is not used.

 

stallGuard limitations:

1. The motor speed must not be lower than 1 RPS.

The original site image is no longer available; awaiting the original file to be supplied.

2. The motor cannot run in stealthChop quiet mode while stallGuard is enabled; the two cannot coexist. stallGuard is only used in spreadCycle mode. If you need both stallGuard at high speed and stealthChop at low speed, you can set the threshold switching register between stealthChop and spreadCycle, 0x13 (TPWMTHUS), to achieve quiet operation below a certain speed threshold (stealthChop) and high-speed vibration suppression + stall detection above this speed threshold (spreadCycle + stallGuard).

 

 

 

← Back to News