Skip to main content
kzawada
Associate III
October 1, 2010
Question

STM32F103 / I2C / FSMC

  • October 1, 2010
  • 3 replies
  • 1368 views
Posted on October 01, 2010 at 23:00

STM32F103 / I2C / FSMC

    This topic has been closed for replies.

    3 replies

    jfong
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:09

    I am using IO emulated I2C to bypass all these troubles in my applications where the FSMC was used.

    kzawada
    kzawadaAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:09

    There seems to be a problem with FSMC and I2C.  I found on another forum someone encounter the same issue.  They state that: ''ST has a really buggy I2C compared to other microcontrollers''.

    This is the link:

    http://www.stm32circle.com/forum/viewtopic.php?pid=4755

    kzawada
    kzawadaAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:09

    FSMC and I2C share the same I/O pin.  This pin is NADV/SDA (PB6).  In later versions of the Reference Manual ST provides a register to disable just the FSMC_NADV in register AFIO_MAPR2.

    There is also a sample project (UM0549) where the developer must disable FSMC clock to be able to read a temperature setting using I2C.

    If you don't have the AFIO_MAPR2 register and are using external memory and C++, this might be very challenging because you cannot access external memory while reading or writing using I2C.

    However, I was able to get this accomplished and be able to have I2C working along with being able to use external SRAM, but not both at the same time.