Nano 33 BLE Sense - SPI communication - glitches on SS

Hello everyone,

I’m trying to communicate from my Nano 33 BLE Sense to a sensor on an external PCB that I’ve wired in, via 4-wire SPI. It works fine as long as my scope probes don’t load the SCLK pin too much (my probes need to be on 10x mode not 1x mode). But… regardless of loading there are massive glitches on the SS pin (see yellow trace in attached image) that’ve got me scratching my head and wondering what are the source of these glitches?

See the 4x glitches per SPI transaction here:

Below is my code:

#include <SPI.h>

const int nCS = 10;

void setup() {
  pinMode(nCS, OUTPUT);

  Serial.begin(500000);
  digitalWrite(nCS, HIGH);
  SPI.begin();
  delay(100);
}

void loop() {
  // put your main code here, to run repeatedly:
  int x1, x2;

  SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE3));
  digitalWrite(nCS, LOW);
  x1 = SPI.transfer(0xF5); // requests WHO_AM_I at address 0x75
  x2 = SPI.transfer(0x00); // returns WHO_AM_I value
  digitalWrite(nCS, HIGH);
  SPI.endTransaction();

  delay(10);

  Serial.print("SPI read: ");
  Serial.print(x1);
  Serial.print("-");
  Serial.println(x2);

  delay(500);
}

Did I use the SPI routines properly? The Arduino is communicating the proper value when I print variable $x2. I know the Nano 33 BLE Sense is a bit new, so maybe something changed in the SPI library/functionality?

Background info: my sensor ICM-42605 has a “WHO_AM_I” register at address 0x75, which always holds the value 0x42 (see datasheet page 83), so that’s how I determine if my reads are correct. I have tried different SPI clock rates, inserting delays during the SPI transaction, and configured SPI via SPI_MODE_0 vs SPI_MODE_3… the register reads work fine, but the glitches won’t go away.