Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 1 month ago.
Does mbed's SPI class make use of hardware SPI or a software implementation?
I'm having trouble understanding how the SPI class works on an mbed enabled platform. Does the mbed library try to make use of hardware SPIs for chips that have on-board SPI peripherals when those pins are selected, or does it just implement SPI in software?
I've just started with mbed and am having trouble getting into the guts of the code because the online IDE prevents me from looking too deep.
Question relating to:
1 Answer
10 years, 1 month ago.
It uses hardware SPI, although there is also a software SPI user library somewhere around (listed in the cookbook, link is on top of the page).
Also have fun, the complete source code: https://developer.mbed.org/users/mbed_official/code/mbed-src/. Keeps you busy for a while ;). You can also delete the mbed lib from the online compiler and import that one, then you can change everything.
Thanks for your answer. I managed to find the implementation details for the API and my target board and have since worked out that using the correct SPI pins for the peripheral is essential, as it appears many implementations will confirm that the pins are all a part of the peripheral and act accordingly, or if there is a pin mismatch, may not function correctly.
posted by 16 Jul 2015