Hi,
So I’m trying to get the hardware SPI up and running on my Particle Photon. (frirmware 4.9) And the instructions explains this fairly well. I do lack some good examples.
At some places on the net it says the SPI bus goes max on 10Mhz, the manual says 60 and so on.
I have the following setup:
//Initializes the SPI bus by setting SCK, MOSI, and a user-specified slave-select pin to outputs, MISO to input. SCK and MOSI are pulled low, and slave-select high.
SPI.begin(A2);
SPI.setClockSpeed(60, MHZ);
SPI.setClockDivider(SPI_CLOCK_DIV64);
SPI.setBitOrder(MSBFIRST); // Data is read and written MSb first.
// Data is captured on rising edge of clock (CPHA = 0)
// Base value of the clock is HIGH (CPOL = 1)
SPI.setDataMode(SPI_MODE0);
When measured with my low-end oscilloscope 1V/div 20us/div 86- 11kHz I get this kind ow saw shape instead of a nice square pattern. Any how, it seems to fail, the rest of my setup. Just want to know if my start is correct.
BR
Chris