When you have connected the TMC21x0 SPI to the TMC4361A, you first need to configure the communcation. This is done in register 0x04 (SPI_OUT_CONF). Polling can be activated or deactivated. To read a register from the TMC21x0 the below sequence needs to be followed:
- Configure register 0x04 (SPI_OUT_CONF):
- Polling activated: SPI_OUT_CONF = 0x4440100C (spi_output_format = 12, disable_polling = 0, cover_done_only_for_cover = 1, cover_data_length= 0)
- Polling deactivated: SPI_OUT_CONF = 0x4440104C (spi_output_format = 12, disable_polling = 1, cover_done_only_for_cover = 1, cover_data_length = 0)
- Read data from register eg. GCONF (0x00):
- With polling activated:
- WRITE to register 0x6D -> 0x00 (GCONF)
- WRITE to register 0x6C -> 0xXX
- READ from register 0x6E
- READ from register 0x6E -> This datagram holds the GCONF register value
- With polling deactivated:
- WRITE to register 0x6D -> 0x00 (GCONF)
- WRITE to register 0x6C -> 0xXX
- WRITE to register 0x6C -> 0xXX
- READ from register 0x6E
- READ from register 0x6E -> This datagram holds the GCONF register value
- With polling activated: