Skip to main content
jfong
Associate II
July 3, 2010
Question

Do I have to remap I2C1 when the FSMC was used?

  • July 3, 2010
  • 13 replies
  • 2422 views
Posted on July 03, 2010 at 09:51

Do I have to remap I2C1 when the FSMC was used?

#afio-i2c1-fsmc
This topic has been closed for replies.

13 replies

daviddavid92
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

Interesting. It looks like it's what is needed, I agree. I haven't tried it myself though.

damh
Associate III
May 17, 2011
Posted on May 17, 2011 at 13:57

There is no register named AFIO_MAPR2 in STM32F1xx.

jfong
jfongAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

Hi!

    I try to modify the register AFIO_MAPR2 but fails, it just keep on 0. I can modify other registers such as AFIO_MAPR or AFIO_EXTICRx but not this one. It seems there are some problem there.

swhite2
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

He got the information from exactly where he said. If you don't have

http://www.st.com/stonline/products/literature/rm/13902.pdf

then get it.

Section 8.4.7 (page 178)

8.4.7 AF remap and debug I/O configuration register2 (AFIO_MAPR2)

Address offset: 0x1C

Reset value: 0x0000 0000

Bit 10 FSMC_NADV: NADV connect/disconnect

This bit is set and cleared by software. It controls the use of the optional FSMC_NADV

signal.

0: The NADV signal is connected to the output (default)

1: The NADV signal is not connected. The I/O pin can be used by another peripheral.

jfong
jfongAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

Hi! damh,

    Where you get this information? It didn't say so in RM0008.

I am using the STM32F103ZE. Then which one has it?

swhite2
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

RM008 doesn't say that AFIO_MAPR2 is specific to the XL family but that doesn't mean it isn't. Interestingly the Standard Peripheral Library v3.3.0 defines AFIO_MAPR2 (in stm32f10x.h) but doesn't reference it at all.

epassoni950
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

Hello,

Be carefull that description of register AFIO_MAPR2 was first in rev 11 of RM008 with new informations about STM32 with 768ko and 1Mo.

In previous rev 10, there is no description of AFIO_MAPR2 even if there is already description of FSMC controler for high density devices (256ko and 512ko)

I am not sure that AFIO_MAPR2 is present in medium density devices and so there is no method to disable NADV function.

Regards

Eric

damh
Associate III
May 17, 2011
Posted on May 17, 2011 at 13:57

@

Ok, new reference manual says that there is a register with this name. But in STMs interpretation of using words, it means something like there could be a register with this name ;)

Fact is, there were STMs without that register. New manual doesn't say, which conditions must be met to have this register.

jfong
jfongAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

Hi! StuartMW,

    The AFIO_MAPR2 has been referenced at function GPIO_PinRemapConfig

in v3.3.0, but in a strange way. I doubt it will work.

daviddavid92
Associate II
May 17, 2011
Posted on May 17, 2011 at 13:57

So it looks like a cockup in earlier devices that has been fixed with this new register in XL devices.....

Chris.