TMCStepper icon indicating copy to clipboard operation
TMCStepper copied to clipboard

Not initialized for current sensing with TMC2209

Open berkut0 opened this issue 1 year ago • 2 comments

I have a Lerdge TMC2226 that seems to be fully compatible with all tmc2209 libraries. I'm trying to read SG_RESULT() to make measurements of the current for calibration purposes (and some features, but that's not important for now).

And there is apparently some kind of bug in the initialization. With cold load, any combination of options shown in the examples does not lead to success with readings. BUT! If I use another TMC2209 library that reads the values easily, I have a interesting situation — after uploading my sketch which using original library right after flashing the example I have very noisy stepper (loud humming noise) and surprisinhly I have measurments and readings!

If it matters, I use esp32-c3. And it connects to the UART.

berkut0 avatar Jul 25 '23 07:07 berkut0

https://github.com/teemuatlut/TMCStepper/issues/87 https://github.com/teemuatlut/TMCStepper/issues/272 These may be related, but the example from the comments does the same thing - returns zero at SG_RESULT()

berkut0 avatar Jul 25 '23 12:07 berkut0

After diving in a bit, I realized that it seems to be my fault. Calculation only happens "while driving", right?

berkut0 avatar Jul 27 '23 22:07 berkut0