Arduino Uno + Arduino Leonardo SPI not working

Hello,

I am trying to make Uno and Leonardo work with external flash via SPI protocol.

However, I met a strange problem that I do not understand. I did not see any clock appear on the oscilloscope in two cases:

a/ With the flash attached (of course, I have a logic-level converter between 3.3V and 5V).
b/ Remove the flash and keep boards as is.

I tested with UNO and Leonardo using SPI flash library and measured on digital pin 13 (uno) or ICSP pin 3.

Am I missing something?

Thank you in advance

Below is the code

#include <SPI.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while (!Serial) ; // Wait for Serial monitor to open

  Serial.println("Begin SPI");
  // initialize SPI:
  SPI.begin(); 
  
  pinMode(10, OUTPUT);
  SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
  SPI.transfer(1);
  SPI.endTransaction();
  
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("Transfer");
  
  SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
  SPI.transfer(127);
  SPI.endTransaction();

  delay(50);
}

However, I met a strange problem that I do not understand. I did not see any clock appear on the oscilloscope in two cases:

a/ With the flash attached (of course, I have a logic-level converter between 3.3V and 5V). b/ Remove the flash and keep boards as is.

In other words: you never saw any change on the SCKL pin?

That may have one of the following reasons:

  • The board is already damanged
  • The wiring is bad
  • The measurement setup was wrong

We cannot check any of the three because we have absolutely no information about them.