We are using the TMC4671-LA to control brushed DC motor with an incremental A/B/N as the primary feedback (currently using the TMC4671-EVAL + TMC-UPS-10A70V-EVAL boards to test the design). Is there any way using the TMC4671-LA to detect if the motor is stalled and if possible program the device to automatically disable the PWM output to protect the motor.
If we set register 0x6D = 3 (PID_POSITION_ERROR) then we can read the current position error in register 0x6C. Is there any way to set a threshold in the TMC4671 that if the position error exceeds a certain value the PWM is disable or the STATUS pin is assert to interrupt the host processor? Section 5 in the datasheet mentions several parameters can be masked to the STATUS interrupt but we cannot find any information on what triggers the interrupt (e.g. if 'pid_x_errsum_limit' is selected what is the errsum_limit?)
Separately, we're not entirely sure how we are supposed to use register 0x26 ABN_DECODER_PPR. The datasheet in section 4.6.2 states that 'The PPR parameter must be set exactly according to the used encoder'. In our case that would be 500 counts/rev. With quadrature & gearbox taken into account this would give us 38000 counts/rev at the output of the gearbox. However, if we set ABN_DECODER_PPR=500 and PID_POSITION_TARGET=38000 the motor only moves a small amount. If we set ABN_DECODER_PPR=65535 and PID_POSITION_TARGET=38000 then we get the expected movement. Is ABN_DECODER_PPR scaled internally or is there some other setting the needs to be set.
Best regards,
Jamie King