Open riversedge opened 4 years ago
Yup, you're absolutely correct. This is fixed in the Release_v1 branch so it'll be included when the time is right. https://github.com/teemuatlut/TMCStepper/blob/Release_v1/src/source/interfaces/TMC5160.hpp
Slight tangent, how you you wire the 5160/5161 for UART Mode? I can't seem to find the documentation for wiring diagram when its in UART mode. Thanks in advance!
Caveat- I’m not the expert but I have spent some quality time with all the datasheets. The 5161 isn’t really out yet. The 5160 data sheet for the chip has a single wire UART but I’ve not seen any of the board designs or stepper sticks have that support. So I do not think you can on the 5160 - it’s designed to be SPI only when you look at the comparison charts. 5161 is supposed to add back in some ability to do config pins.
The only site I found that mentions uart mode is this one site, they talk about which pins to jump to switch from SPI mode to UART...
https://wiki.fysetc.com/S5161_V1.1/
But there is no mention of which physical pin it is. The BigTreeTech drivers don’t have options for anything to be jumped.
If you look at the table you’ll see:
Configuration | CFG Pins or SP
And in the table below that none of them show enabling UART.
If you go to the ‘Wiring Diagram’ and you see the table it says if you set SPI = 0, SD = 0 that is for UART Mode.
On the chipset but not the stepper stick as far as I can see. From what I’ve seen It’s not possible on the stepper sticks, but since I don’t have one I’m at the limit of being able to help you any further. I looked the other day for my project and couldn’t see where the 5161 was even being sold broadly yet.
Possibly @teemuatlut has received an early release or has more useful information; however you’re asking for hardware support and this site is just around the Arduino driver library. If you think it should be possible, might be best to submit something to FYSTEC who would be the experts in the hardware you’re looking at.
0x6F for DRV_STATUS in datasheet shows 3 flags missing from the inherited TMC2130 struct. For TMC5160 should have the following that includes s2vsa, s2vsb, stealth instead of the reserved 5 bits.