Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Serial Peripheral Interface
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Mode numbers === The combinations of polarity and phases are referred to by these "SPI mode" numbers with CPOL as the high order bit and CPHA as the low order bit: {| class="wikitable" |- ! SPI mode ! Clock polarity<br />(CPOL) ! Clock phase<br />(CPHA) !Data is shifted out on ! Data is sampled on |- | 0 || 0 || 0 |falling SCLK, and when {{Overline|SS}} activates || rising SCLK |- | 1 || 0 || 1 | rising SCLK || falling SCLK |- | 2 || 1 || 0 | rising SCLK, and when {{Overline|SS}} activates || falling SCLK |- | 3 || 1 || 1 |falling SCLK|| rising SCLK |} Notes: * Another commonly used notation represents the mode as a (CPOL, CPHA) tuple; e.g., the value '(0, 1)' would indicate CPOL=0 and CPHA=1. * In Full Duplex operation, the master device could transmit and receive with different modes. For instance, it could transmit in Mode 0 and be receiving in Mode 1 at the same time. * Different vendors may use different naming schemes, like CKE for clock edge or NCPHA for the inversion of CPHA.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)