Post Go back to editing

TMC2240 Address Confusion

Category: Datasheet/Specs
Product Number: TMC2240
Software Version: da

Hi,

I am looking at using the 1-wire uart for the TCM2240 but to me is unclear the address value. I am using just two devices so I can fix the address

As far as I understand you can set the address between 0 and 7 (so 0b000 to 0b111) so your 8-bit node address in the device can be any from 0b00000000 to 0b00000111. However, I see this also as NODEADDR. Do I need to write this in NODECONF or does this automatically get updated from the pin's status on start-up?

I would also like some clarification on this phrase:

EACH BYTE IS LSB…MSB, HIGHEST BYTE TRANSMITTED FIRST

So first you should send the sync nibble, then the reserved then NODEADDR then R/W+7bit register address and the data and CRC but within each byte you send MSB then LSB?

Do you offer some sample/example code for this uart interface? 

  • Hi,

    correct, the nodeaddress becomes set by the pins automatically. No need to write a different address. The bit order is standard UART bit order - you just need to make sure that you send the correct byte sequence using 8 Bit and one stop bit. Use the CRC calculation from the IC datasheet. For a library fitting your CPU, I would search GitHub for Trinamic or Trinamic UART. There you find a number of implementations. 

    Hope this helps.