cancel
Showing results for 
Search instead for 
Did you mean: 

UART to interface with TMC2209-Eval Board problems

RPG
Senior

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

30 REPLIES 30

Thank you. I have verified what you say and is correct. Thanks for the correction.

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.

No, the last (CRC) byte is not included in the CRC calculation. The datasheet code example also shows that.

JMybu.1
Associate II

@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.

JMybu.1
Associate II

@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.

Piranha
Chief II

> 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.

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

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

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.

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!