MT6835 Angle sensor 21bit

Timing the SPI read with SPI.setClockDivider(SPI_CLOCK_DIV16); (168/16 = 10,5 Mhz)

Timing in micros();

Iterations:   700
elapsed_ticks:   9339.0000
time per iteration:   13.3414

Using the SPI.beginTransaction(settings); did not make a difference. Having it around the SPI.transfer actually increased the time to 21 micros.

Pushing it with SPI.setClockDivider(SPI_CLOCK_DIV8); Don’t know if the data is corrupted.

Iterations:   700
elapsed_ticks:   7738.0000
time per iterasion:   11.0543

The data does look ok w. 21Mhz

70,100110011100111010100,3.7749951
71,100110011100111010100,3.7749951
72,100110011100111010100,3.7749951
73,100110011100111010100,3.7749951
74,100110011100111010100,3.7749951
75,100110011100111010100,3.7749951
76,100110011100111010010,3.7749889
77,100110011100111010010,3.7749889
78,100110011100111010010,3.7749889
79,100110011100111010010,3.7749889
80,100110011100111010010,3.7749889