No SPI clock signal.

Sorry Guys, after 3 days of trying I have to call for help.

Story.
Some time ago I started a design project that I had to shelve for a while. Recently I decided to do some more work on it. Before I shelved it the project worked fine, now it doesn't. I have upgraded my computers and the Arduino IDE since that time.

The project originally consisted of a keypad, Feather MO (SAMD21), RA8875 tft driver board and a tft display.

When I returned to the project it would not boot the display. Assuming the worst I replaced the Feather with a Zero and changed the RA8875 for a new part. Still no success. Further investigation shows that the Zero is not recognizing the RA8875 for some reason.

Here is the simple test code that I am using, it is based on the Adafruit RA8875 library example "textmode".

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_RA8875.h>

// Library only supports hardware SPI at this time
// Connect SCLK to Zero header pin 3
// Connect MISO to Zero header pin 1
// Connect MOSI to Zero header pin 4
#define RA8875_INT  3
#define RA8875_CS 10
#define RA8875_RESET 9

Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);
uint16_t tx, ty;

void setup() 
{
  Serial.begin(9600);
  Serial.println("RA8875 start");

  /* Initialise the display using 'RA8875_480x272' or 'RA8875_800x480' */
  if (!tft.begin(RA8875_800x480)) {
    Serial.println("RA8875 Not Found!");
    while (1);
  }

pinMode(RA8875_CS, OUTPUT);

  tft.displayOn(true);
  tft.GPIOX(true);      // Enable TFT - display enable tied to GPIOX
  delay(200);
  
  tft.PWM1config(true, RA8875_PWM_CLK_DIV1024); // PWM output for backlight
  tft.PWM1out(255);
  tft.fillScreen(RA8875_GREEN);
}
void loop() 
{
}

I put the "pinMode" line into the code as a result of reading some Arduino documentation.

The immediate problem is that the program fails to find the RA8875. Serial monitor says "RA8875 Start" immediately followed by "RA8875 not found". I have replaced both the Zeros and the RA8875 during troubleshooting. This may be a misleading warning because when I 'scope the SPI signals I see no SPI clock. All other signals seem to be changing except the SPI clock and the INT signal.

Anyone see any obvious errors before I dig more deeply?

Thanks.

Does any other SPI example produce clock signals for you?

I believe, I have not used Arduino for years, that I/O pins default to input on boot.
Please ,anybody correct me if I am wrong.
You set the CS (chip select) pin mode to output AFTER you access the device.

BUT, some well written. "libraries" set the pins during construct / initialization.

Easy way to semi-prove would be to set the indicator LED - pin 13 (?) to light up same time as YOU do both - set the CS to output and write it LOW - CS signals are generally active / selected LOW.

Since you have only one CS signal to work with you can do this test BEFORE you construct the class. no harm done.

BTW CS should be set for internal pull-up also.

Thanks for the suggestions and background. I will follow up on them tomorrow.

I did try a different SPI program but it was another Adafruit example, I will try a third party program.

I wrote a program to ping the pins assigned to the SPI bus from the micro as digital outputs. All 3 pins responded correctly.

Deeper reading confirmed my understanding that the SPI clock is initiated on the falling edge of CS. This is an automatic operation so why do I not get a clock when I can see CS fall on my 'scope? I will delete and re-install the SPI library entry tomorrow to see if that helps.

The clock is not initiated by CS falling. You control CS in your program. After lowering CS you can start to send SPI data. The write() method starts the clock.