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?

2

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 Nov 30 '15 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.