I need to reduce the SPI clock speed of the Arduino Due down to about 100 kHz. Unfortunately my hardware doesn't support higher speeds.
With the current maximum divider of 255, I can only reach a speed of still 320 kHz (SPI.setClockDivider(10, 255);).
Of course I could use a software SPI, but I'm still interested in using the build-in hardware. A possible solution could be to lower the overall clock speed of 84 MHz. Any idea how to achieve this?
1 Answer 1
You can try using the SPISettings interface:
SPISettings settings(100000, MSBFIRST, SPI_MODE0);
SPI.beginTransaction(settings);
... do your stuff ...
SPI.endTransaction();
-
Very interesting, it seemed that "setDataMode()" function didn't work correctly, just with SPISettings interface I got the correct mode. Additionally I had to slow down the CS line. The SPI speed was ok in my case. Thanks!Thomas– Thomas2015年11月30日 19:55:11 +00:00Commented Nov 30, 2015 at 19:55
Explore related questions
See similar questions with these tags.