LSM6DS3 IMU - Arduino Due SPI Mode

I connected the Sparkfun LSM6DS3 IMU board to my Arduino Due in I2C mode. The setup works, except for spurious tics that occasionally appear in the accel and gyro readings. One day the tics are there, other days they are not. I tried changing the LSM6DS3 bandwidth, output-data-rate, filtering, but I still get the tics. I tried a separate LSM6DS3, but no luck.

So I attempted SPI mode to see if it helps the tic problem, but I can't get SPI to function. Has anyone tried the LSM6DS3 in SPI mode for the Arduino Due? Thanks.

I made some progress with the SPI connection. The LSM6DS3 is communicating, but it keeps returning the value 255. Even the WHO_AM_I register (0X0F) returns 255. Does the SPI library really work for the Due?

The small sketch below demonstrates the problem.

#define SSX  4   

#include <SPI.h>

void setup() {

    uint8_t  result;
    uint8_t  address = 0X0F;

    Serial.begin(115200);
    
    pinMode(SSX, OUTPUT);
    digitalWrite(SSX, HIGH);

    SPI.begin(SSX);
    SPI.setBitOrder(MSBFIRST);
    SPI.setDataMode(SSX, SPI_MODE3);
    SPI.setClockDivider(SSX,10);        // Due: (pin,divider: 1 to 255)

    digitalWrite(SSX, LOW);             // Select chip
    result = SPI.transfer(SSX, address);   
    digitalWrite(SSX, HIGH);            // De-select chip

    Serial.println("Who Am I:");
    Serial.println(result);
}

void loop() {
}