1

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?

asked Nov 30, 2015 at 16:55

1 Answer 1

2

You can try using the SPISettings interface:

SPISettings settings(100000, MSBFIRST, SPI_MODE0);
SPI.beginTransaction(settings);
... do your stuff ...
SPI.endTransaction();
answered Nov 30, 2015 at 17:01
1
  • 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! Commented Nov 30, 2015 at 19:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.