adafruit / Adafruit_FRAM_SPI

Driver for Adafruit's SPI-Based FRAM Breakouts
Other
33 stars 29 forks source link

ATSAMD51 hardware SPI not working #11

Closed NuclearPhoenixx closed 4 years ago

NuclearPhoenixx commented 4 years ago

Hi, I've been recently working with the ATSAMD51 and come to test it with some FRAM. However, it seems like the hardware spi mode has some issues.

Load the example info sketch. Using "hardware spi" the samd seems to freeze and does not open any serial connections. If you use the "software spi" with manual pins it seems to work. At least I'm getting serial connections again. Compilation is successfull in both cases.

ladyada commented 4 years ago

try changing this speed to 1MHz? https://github.com/adafruit/Adafruit_FRAM_SPI/blob/master/Adafruit_FRAM_SPI.cpp#L109

NuclearPhoenixx commented 4 years ago

Doesn't change anything, same problem :/

RobertKieboom commented 4 years ago

I am having exactly the same problem on the feather M0 (ATSAMD21). Software SPI works, hardware SPI doesn't. It doesn't work on a genuino zero either. Other SPI devices (like you micro SD breakout) do work on both. I checked on an Arduino Uno and that works too. The ATSAMD devices hang in the begin (I confirmed that with debugging on the zero with PlatformIO). It makes no difference if I use PlatformIO or the Arduino IDE. I have the latest version of the library installed.

ladyada commented 4 years ago

woops yeah a bunch of stuff was wrong, please try 2.x - either wait for the arduino lib manager to update or get master branch here! re-open if still an issue :)

RobertKieboom commented 4 years ago

Got the master branch, working like a charm. Thank you ladyada!!