6 years, 10 months ago.

SPI_CS has a wrong pin number on the picture

Hi, the definition of the SPI Pin CS is as follow

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}

this means the PB_6 is wrong if you choose that and the SPI will not work. Please fix that in the picture

The same mistake is there in the code .. the definition of the pins as bellow

    // Standardized button names
    BUTTON1 = USER_BUTTON,
    SERIAL_TX   = PA_2,
    SERIAL_RX   = PA_3,
    USBTX       = PA_2,
    USBRX       = PA_3,
    I2C_SCL     = PB_8,
    I2C_SDA     = PB_9,
    SPI_MOSI    = PA_7,
    SPI_MISO    = PA_6,
    SPI_SCK     = PA_5,
    SPI_CS      = PB_6,
    PWM_OUT     = PC_7,

/Mariwan

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F030R8T6 microcontroller.
Be the first to answer this question.