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, 5 months ago.
SPI CS Pin Definition Mismatch
In the platform page of NUCLEO-F030R8, SPI CS is defined as PB6. SPI_MOSI=PA_7 SPI_MISO=PA_6 SPI_SCK =PA_5 SPI_CS =PB_6
But when I used it in my code to init SPI slave, I got an error: pinmap not found for peripheral.
In the code of STM32F0 the CS pin can only be PA4 and PA15 and when I use one of these two pins it works.
const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI1)}, {PA_15, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI1)}, {PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)}, {NC, NC, 0} };
I only test the SPI slave but I don't think it'll work for SPI master either.
Pls correct the SPI_CS definition on platform page, and also in the code(PinNames.h).
Thanks.
BRXiaohai Li