Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arduino SPISettings, start/endTransaction() functions to firmware #1152

pkourany opened this issue Oct 30, 2016 · 4 comments


Copy link

commented Oct 30, 2016

The existing Particle firmware supports the basic Arduino SPI functions. However, when there are two or more SPI devices on the bus, they tend not to play nice. In arduino land, this is addressed using SPISettings() object, and accompanying beginTransaction() and endTransaction() functions to set and reset the SPI bus settings before and after each transaction (the SDFat library uses simple versions of these!). Vendors are writing their libraries using these functions more often (and for good reasons).

An ideal implementation would "push" the active SPI control register (2) values on SPI.beginTransaction() and "pop" them on SPI.endTransaction() to be the ultimate best SPI citizen.

SPISettings() is an SPI friend class while beginTransaction() and endTransaction() are SPI class functions.

I have attached copies of the Arduino (v1.6.14) SPI library files for reference

Arduino SPI


  • Minimum test case added
  • Device, system and user firmware versions stated
  • Particle confirmed

This comment has been minimized.

Copy link

commented Dec 13, 2016

Would this be available in the particle online compiler soon ?


This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2016

@whatnick, not until the next release of system firmware.

@avtolstoy avtolstoy closed this Jan 20, 2017


This comment has been minimized.

Copy link

commented Jan 20, 2017

Implemented in #1188, included in 0.6.1-rc.1


This comment has been minimized.

Copy link

commented Sep 6, 2017

There is a regression since 0.6.2-rc.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.