![]() |
STM32Cube
Version 2.0
Create Projects for STM32F2 Series with STM32Cube HAL and STM32CubeMX
|
The CMSIS-Driver SPI requires:
Valid settings for various evaluation boards are listed in the table below:
Peripheral Resource | MCBSTM32F200 | STM3220G-EVAL |
---|---|---|
SPI Mode | SPI2: Full-Duplex Master | SPI2: Full-Duplex Master |
MOSI pin | PB15 | PB15 |
MISO pin | PB14 | PB14 |
SCK pin | PB10 | PB10 |
NSS pin | PB12 | PB12 |
For different boards, refer to the hardware schematics to reflect correct setup values.
The STM32CubeMX configuration for MCBSTM32F200 with steps for Pinout, Clock, and System Configuration are listed below. Enter the values that are marked bold.
Under Connectivity open SPI2 Configuration:
Pin Name | Signal on Pin | GPIO mode | GPIO Pull-up/Pull.. | Maximum out | User Label |
---|---|---|---|---|---|
PB10 | SPI2_SCK | Alternate | No pull-up and no.. | High | . |
PB12 | SPI2_NSS | Alternate | No pull-up and no.. | High | . |
PB14 | SPI2_MISO | Alternate | No pull-up and no.. | High | . |
PB15 | SPI2_MOSI | Alternate | No pull-up and no.. | High | . |
Interrupt Table | Enable | Preemption Priority | Sub Priority |
---|---|---|---|
DMA1 stream3 global interrupt | ON | 0 | 0 |
DMA1 stream4 global interrupt | ON | 0 | 0 |
SPI2 global interrupt | ON | 0 | 0 |
Click OK to close the SPI2 Configuration dialog