9 years, 2 months ago.

How do you select the different SPI ports on the F401RE

Gents, I gather from the documentation that there are 4 SPI ports on the F401RE although I can only find 3 on the pinout picture, is there a typo. How do you use SPI2 or SPI3 and determine which pins are used for MOSI, MISO and CLK as there appears to be several pins which are able to be used for each port? Cheers Mike

1 Answer

9 years, 2 months ago.

I see it says so on the platform page, might be a typo, unless it also says so on other places. This is the list of pins according to the mbed code: https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/spi_api.c (you can ignore the third column). You simply make an SPI object with the pins you want: http://developer.mbed.org/handbook/SPI

Accepted Answer

Erik, thank you for answering a question where I could've found the information by RTFM. In my defence it was late and I was using a library that only needed the CS pin selected by the user not the other SPI pins. Cheers Mike.

posted by Michael Bawden 02 Feb 2015