AnsweredAssumed Answered

STM32F429 + I2C1 on PB7(SDA) and PB8(SCL)

Question asked by nixon.malcolm on Jul 14, 2014
Latest reply on Aug 18, 2015 by waclawek.jan
Greetings all,

The STM32F429 data sheet lists the following pinmux options:
 PB6: AF4=I2C1_SCL
 PB7: AF4=I2C1_SDA
 PB8: AF4=I2C1_SCL
 PB9: AF4=I2C1_SDA
 
I have a custom board which brings the I2C1 bus out on PB7(SDA) and PB8(SCL); however it doesn't appear to function with this pinmux configuration:

// Configure pins for I2C1 (PB7: I2C1.SDA, PB8: I2C1.SCL)
GPIO_PinAFConfig(GPIOB, GPIO_PinSource7, GPIO_AF_I2C1);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource8, GPIO_AF_I2C1);

// Configure pins for I2C1 (PB7: I2C1.SDA, PB8: I2C1.SCL)
GPIO_InitTypeDef gpioInit;
gpioInit.GPIO_Pin  = GPIO_Pin_7 | GPIO_Pin_8;
gpioInit.GPIO_Mode = GPIO_Mode_AF;
gpioInit.GPIO_Speed = GPIO_Speed_2MHz;
gpioInit.GPIO_OType = GPIO_OType_OD;
gpioInit.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOB, &gpioInit);

If I hack the code to use PB6(SCL) and PB7(SDA) then I see data on the PB7 line. If I hack the code to use PB8(SCL) and PB9(SDA) then I see clocks on the PB8 line.

I'm wondering if there's an undocumented limitation where only PB6/PB7 and PB8/PB9 are allowed configurations? Is it possible to use PB7/PB8 or PB6/PB9?

- Malcolm Nixon

Outcomes