Hmm--well, the code shown below didn't work for me; I don't see any activity on SCK (D13) or MOSI (D11) on the scope.
I confirmed that avrSpiTest() is executing by seeing the chip select line toggle.
Any ideas? Could you share the code you used for your test?
Thanks.
Dan
SPIClass SPI1 (&sercom1, 12, 13, 11, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_3);
// called from setup (not shown here)
void setupAVRSpi()
{
SPI1.begin();
}
void loop()
{
serialCheck();
avrSpiTest();
}
void avrSpiTest()
{
static byte count = 0;
digitalWrite(avrChipSelectPin, LOW);
SPI1.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
SPI1.transfer(count++);
SPI1.endTransaction();
digitalWrite(avrChipSelectPin, HIGH);
}