Skip to content

error[E0277]: the trait bound stm32f4xx_hal::gpio::Pin<'F', 15, stm32f4xx_hal::gpio::Alternate<4, stm32f4xx_hal::gpio::OpenDrain>>: gpio::alt::PinA<Sda, FMPI2C1> is not satisfied #569

Closed
@ghost

Description

I believe the issue comes from

#[cfg(feature = "fmpi2c1")]
pin! {
<i2c::Scl, FMPI2C1> for [PC6<4>],
<i2c::Sda, FMPI2C1> for [PC7<4>],
<i2c::Sda, FMPI2C1> for [PB3<4>],
<i2c::Scl, FMPI2C1> for [PB10<9>],
<i2c::Sda, FMPI2C1> for [PB14<4>],
<i2c::Scl, FMPI2C1> for [PB15<4>],
<i2c::Scl, FMPI2C1> for [PD12<4>],
<i2c::Scl, FMPI2C1> for [PB13<4>],
<i2c::Scl, FMPI2C1> for [PD14<4>],
<i2c::Scl, FMPI2C1> for [PD15<4>],
<i2c::Scl, FMPI2C1> for [PF14<4>],
<i2c::Scl, FMPI2C1> for [PF15<4>]
}
where there are more FMPI2C1 pins defined as Scl and not as many Sda pins. As per the datasheet for STM32F413 the pin PF14 is SCL and PF15 is SDA.

From the STM32F413/23 datasheet it should be:

#[cfg(feature = "fmpi2c1")]
pin! {
    <i2c::Sda, FMPI2C1> for [PB3<4>],
    <i2c::Scl, FMPI2C1> for [PB10<9>],
    <i2c::Sda, FMPI2C1> for [PB14<4>],
    <i2c::Scl, FMPI2C1> for [PB15<4>],
    <i2c::Scl, FMPI2C1> for [PC6<4>],
    <i2c::Sda, FMPI2C1> for [PC7<4>],
    <i2c::Scl, FMPI2C1> for [PD12<4>],
    <i2c::Sda, FMPI2C1> for [PD13<4>],
    <i2c::Scl, FMPI2C1> for [PD14<4>],
    <i2c::Sda, FMPI2C1> for [PD15<4>],
    <i2c::Scl, FMPI2C1> for [PF14<4>],
    <i2c::Sda, FMPI2C1> for [PF15<4>]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions