I am probing the SPI Clock pin 13 with my analog discovery 2. Nothing else is connected. The clock signal is there but it rises over time. (see picture) Here is my code:
#include <SPI.h>
void setup() {
// put your setup code here, to run once:
SPI.begin();
SPI.beginTransaction(SPISettings(100000, MSBFIRST, SPI_MODE0));
pinMode(8, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(8,LOW);
SPI.transfer(0xF7);
SPI.transfer(0xFF);
digitalWrite(8,HIGH);
delay(500);
}
SPI.endTransaction()
. Also, SS pin by default is set to pin 10, and automatically set to OUTPUT when you call SPI.begin().