Testing SPI, added all the code to drive the SPI on the A3985 correctly I believe, the SPI pins are reading the correct data.
It seems though that the MOSI pin is only operating at 2.9V instead of 5V logic, but the data is all correct.
The other pins on the ATMEGA are outputting 5V logic, the A3985 is sinking too much current from the ATMEGA I think

SPI isn't working.