I tried goin in reverse now, using UNO as the master and SAMD as the slave. But again I'm running in to problems. I used this code for the SAMD21 slave. And this for the master:
#include <SPI.h>
#include<Arduino.h>
void setup (void)
{
digitalWrite(SS, HIGH); // ensure SS stays high
SPI.begin ();
SPI.setClockDivider(SPI_CLOCK_DIV4); //Sets clock for SPI communication at 8 (16/8=2Mhz)
Serial.begin(115200);
} // end of setup
void loop (void)
{
byte c;
// enable Slave Select
digitalWrite(SS, LOW); // SS is pin 10
// send test string
for (const char * p = "Fab" ; c = *p; p++)
SPI.transfer (c);
// disable Slave Select
digitalWrite(SS, HIGH);
delay (100);
} // end of loop
I tried changing the clock div to all values but it doesn't help, any hints on what is wrong assuming the connections are correct?
In addition to that I tried sending from SAMD21 to SAMD21 using the code that worked after lowering frequency but the slave never gets any data.