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.
9 years, 7 months ago.
Connecting SPI to PC9 & PC8 gives "pinmap not found for peripheral"
Hi,
I am trying to connect to a DAC via SPI using the following line;
SPI xdac_spi(PC_9, NC, PC_8);
But this results in the following error being returned via the serial connection
"pinmap not found for peripheral"
I have diagnosed the problem to be coming from the terms PC_9 and PC_8. If I swap these pins out for other pins it works. Due to hardware constraints I can't use other pins without changing the design. Why cant these pins be used?
1 Answer
9 years, 7 months ago.
Because these pins do not have the option to be connected to a SPI peripheral, so it simply is not possible. For the complete pinout options, see: http://developer.mbed.org/users/mbed_official/code/mbed-src/file/098575c6d2c8/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/spi_api.c.
What you can do is use a software SPI, which can't reach the speed the hardware SPI can reach, but it will work on any pin: http://developer.mbed.org/users/davervw/code/SWSPI/