![]() |
STM32Cube
Version 2.0
Create Projects for STM32F2 Series with STM32Cube HAL and STM32CubeMX
|
The CMSIS-Driver I2C requires:
Valid settings for various evaluation boards are listed in the table below:
Peripheral Resource | MCBSTM32F200 | STM3220G-EVAL |
---|---|---|
I2C Mode | I2C1: I2C | I2C1: I2C |
SCL pin | PB8 | PB6 |
SDA pin | PB9 | PB9 |
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 I2C1 Configuration:
DMA Request Settings | Label | Peripheral | Memory |
---|---|---|---|
Mode: Normal | Increment Address | OFF | ON |
Use Fifo OFF Threshold: Full | Data Width | Byte | Byte |
. | Burst Size | Single | Single |
DMA Request Settings | Label | Peripheral | Memory |
---|---|---|---|
Mode: Normal | Increment Address | OFF | ON |
Use Fifo OFF Threshold: Full | Data Width | Byte | Byte |
. | Burst Size | Single | Single |
Pin Name | Signal on Pin | GPIO mode | GPIO Pull-up/Pull.. | Maximum out | User Label |
---|---|---|---|---|---|
PB8 | I2C1_SCL | Alternate | Pull-up | High | . |
PB9 | I2C1_SDA | Alternate | Pull-up | High | . |
Interrupt Table | Enable | Preemption Priority | Sub Priority |
---|---|---|---|
DMA1 stream0 global interrupt | ON | 0 | 0 |
DMA1 stream6 global interrupt | ON | 0 | 0 |
I2C1 event interrupt | ON | 0 | 0 |
I2C1 error interrupt | ON | 0 | 0 |
Click OK to close the I2C1 Configuration dialog