1
\$\begingroup\$

For integrated circuits that use SPI interface, they specify maximum clock frequency in their datasheets such as attached below. enter image description here

The question is that if the datasheet speficies the maximum frequency as 6MHz, can I decide that it will be safe to set up clock speed exactly at 6MHz(accuracy determined by crystal used for MCU)? Or It is safer to have some margin?

\$\endgroup\$
3
  • \$\begingroup\$ what is the data speed required for your application? what is your application? It can work up to 6Mhz if other device on Bus supports it. \$\endgroup\$
    – user19579
    Commented Sep 1, 2016 at 14:30
  • \$\begingroup\$ @user19579 The MCU I am using supports data rate up to 12MHz \$\endgroup\$
    – Steve
    Commented Sep 2, 2016 at 6:28
  • \$\begingroup\$ What is the max dataspeed required for your application? \$\endgroup\$
    – user19579
    Commented Sep 3, 2016 at 12:42

3 Answers 3

6
\$\begingroup\$

No, 6 MHz is guaranteed to work by the specification.

In practice you will very likely find devices which can work up to 8 or even 10 MHz. But it is not guaranteed that that will always work for all power supply voltages, temperatures and all chips from any batch.

The 6 MHz however is guaranteed over all conditions. So no, you do not need a margin as long as your 6 MHz is accurate enough (and it probably will be as it is usually derived from a crystal based clock).

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Guaranteed ... depending on your fulfilling all the other conditions in the contract (datasheet). Such as clock pulse widths, correct timing between data and clock edges, etc. If you can't satisfy all of these at 6 MHz, you may have to lower the clock frequency as part of the way to satisfy them. \$\endgroup\$
    – user16324
    Commented Sep 1, 2016 at 9:10
4
\$\begingroup\$

Note that the clock high and low widths are specified as 83ns min, which works out to just over 6MHz, question is can you guarantee to meet those timings (Which requires your SPI clock to be pretty much an exact 50% duty cycle)....

When figuring out how to meet timing you generally need to look at the data sheets for both ends of the link, and then do some sums to see what the maximum frequency is with worst case timings on both ends, just looking at one end only tells you what may be possible, not what will be possible (as that depends on both sets of timings).

\$\endgroup\$
0
\$\begingroup\$

Actually Bimpelrekkie's answer is not correct. You should consider the propagation delay between master and slave either. You can find the detail information in the link Using SPI protocol at 100 MHz.

\$\endgroup\$

Your Answer

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

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