uP communication with TMC429

Miniaturized tripple stepper motor controller ICs

uP communication with TMC429

Postby JJAYAR » 13 Jun 2011, 03:08

Hi can some one comment
I just assembled my pcb with TNC429 & a dsPIC microC

While developing the communication I was reading the register values
and I noticed that I was always reading
0001_1101_0000_0000_0000_0000_0000_0000 = (d31.....d0)

I always read 0 for the d23...d0 bits even if I write a value to the register
the status byte (d31..d24) will change if I change the Ref1,2 or 3 values
but the d23...d0 always remains the same (zero)

I tried reading the Global Parameter Register ( which I think has a non zero d23..d0)
but no luck...the dsPIC reads d23..d0 as zero

Can some one comment on what might be happening
Is there a bit I need to set/reset before I start read/write operations

Thanx for help in advance

Jay
JJAYAR
Power User
Power User
 
Posts: 15
Joined: 12 Jun 2011, 05:45

Re: uP communication with TMC429

Postby Dr.LarsLarsson (TRINAMIC) » 14 Jun 2011, 19:22

For first read test of SPI communication you should try to read out the type_version_429 register. Possibly, your SPI (write) access does not work correctly yet and it could happen that you over write the global parameter register with zero and then you read out zero.
User avatar
Dr.LarsLarsson (TRINAMIC)
Site Admin
 
Posts: 323
Joined: 21 Jul 2006, 14:46

Re: uP communication with TMC429

Postby tkf » 30 Jun 2011, 20:20

I have just hooked up a new TMC 429, and I am trying to test the comm connection by reading out the firmware version register (0x73 as first 8 bits of datagram). I think I should be getting 0x42 0x91 0x01, but instead I see 0x00 0x32 0x31. I verified this on my o'scope, so it's not just bad interpretation by the SPI routine on my host. Any hints?

EDIT: As it turns out, things work as I expected when doing the SPI comm from an AVR directly. I experienced the strange responses while trying to use a "Bus Pirate" board to quickly get the system up and running. I tried several variants of the SPI settings with the Bus Pirate, but never got a sensible conversation going between the two. Just an FYI for anyone else trying that.
tkf
User
User
 
Posts: 3
Joined: 30 Jun 2011, 20:10

Re: uP communication with TMC429

Postby Dr.LarsLarsson (TRINAMIC) » 04 Jul 2011, 21:33

There is no magic concerning the µC SPI interface of the TMC429. We use the TMC429 in many of our products. Did you verify that the SPI timing is compatible with the clock frequency of the TMC429? It would be helpful if you would post the SPI communication (nSCS_C, SCK_C, SDI_C, nINT_SDO_C resp. SDOZ_C).
User avatar
Dr.LarsLarsson (TRINAMIC)
Site Admin
 
Posts: 323
Joined: 21 Jul 2006, 14:46


Return to TMC428 / TMC429

Who is online

Users browsing this forum: No registered users and 0 guests