2022-10-13 04:20 PM
Hi
I have to connect an STM34 Nucleo board to a TMC2209. I have to setup a single wire UART. Only TX is connected with the TMC board.
I transmitted a datagram and when I try to receive the response I get back the initial data I have e sent.
Does anybody know what could be happening?
does anyone has experience controlling a stepper motor with TRINAMIC TMC2209?
Please, I need help. I am in a bit of a hurry.
Best regards, Raúl
Solved! Go to Solution.
2022-11-01 11:14 AM
Thank you. I have verified what you say and is correct. Thanks for the correction.
2022-11-01 11:16 AM
Anyway. I have tried the TMC2209-EVAL board and is not not even working as expected out of the box. I was trying for a couple of weeks and I had to give up. When I tried with the TMC2209-BOB also from TRINAMIC it worked straight without any effort.
2022-11-01 01:39 PM
No, the last (CRC) byte is not included in the CRC calculation. The datasheet code example also shows that.
2022-11-02 06:50 PM
@Piranha
You Wrote:
"And your CRC is also wrong. The correct CRC for this sequence is 0x9C."
I stand corrected here. You are correct on this point and I apologize for my error.
A most important issue is the absolute neccessity to check the IFCNT register at address 0x02
which holds the the number of successfull WRITE transmissions.
This is the only real way to confirm if your writes were successfull.
2022-11-02 07:07 PM
@Piranha
0x05, 0x00, 0xEC, 0x10,0x00,0x00,0x53, 0x9C is the order that the TCM2209 expects to receive the data, was my point. First byte out of the UART is 0x05 sync byte etc. through to 0x9C CRC byte.
How you arrange these in memory is up to you.
2022-11-03 07:21 PM
> neccessity to check the IFCNT register
Absolutely agreed on this one!
> How you arrange these in memory is up to you.
The driver's datasheet doesn't talk or care about a representation in MCU's memory. It talks about the driver's registers, which are 32-bit. The default value for CHOPCONF register 0x10000053 shows that the byte 0x10 corresponds to register bits [31:24] - the highest byte. As it must be transferred first, the datasheet is correct that the byte order is big-endian - highest byte first.
2023-03-07 06:22 PM
hi
I have the same problem as you.
I want to use StallGuard4™ function, but uart communication is not available.
I would appreciate it if you could upload the communication or crc code.
or send me an email
thank you
2023-03-07 06:23 PM
hi
I have the same problem as you.
I want to use StallGuard4™ function, but uart communication is not available.
I would appreciate it if you could upload the communication or crc code.
or send me an email
thank you
2023-03-07 09:00 PM
Hey
I have never got it to work with the EVAL board. I bought the TMC2209-BOB and worked like a charm.
Beware that you need to plug the motor coils terminals to make it work.
I have an example setup with a simple project I made with a NUCLEO board where I made a porting to C from an Arduino library to control the motor if you are interested. That works for me very well.
Br.
2023-11-22 11:24 AM
Hey, sorry to bump this after 8 months but would you mind sharing the code somewhere public? I've been banging my head against this for the last week. Thanks!