2013-02-25 10:38 PM
Hello, I try to make I2C on PF6/7 on the STM32F051C6 (48 Pin device) working.
To get what AF to use, Ref man points to the datasheet. But the datasheet is not clear to me, it has a AF Table for PortA and PortB and Table 13 Pin definitions says PIN 35 - - PF6 I/O FT I2C2_SCL PIN 36 - - PF7 I/O FT I2C2_SDA I tried AF0 and AF1 but the chip let me in the dark. The code I have is working on the STM32F0-discovery with I2C1 on PB6/7. Any ideas? Ju #i2c-stm32f051c62013-02-26 07:10 AM
I tried AF0 and AF1 but the chip let me in the dark.
The chip only supports GPIOx_AFRL/H on ports A and B so doing anything of port F would be impossible/inadvisable. Just set the pins in AF mode, and don't change the PinSource muxing. Set the pins as OD, and use external pull-ups.2013-02-26 07:57 AM
clive1 you are my hero.
I got it working on the discovery. Now I have to make it work on my PCB. No big deal I guess. But can you tell me where you got this info from, that GPIOx_AFRL/H only works on Port A and B. Or is this just interpretation because of missing AF table to other ports? Ju2013-02-26 08:24 AM
But can you tell me where you got this info from, that GPIOx_AFRL/H only works on Port A and B.
It's marked in a couple of places in the reference manual in terms of scoping when the registers are valid.2013-02-26 09:00 AM
2013-11-22 07:41 AM
Ho gnoss,
please, can you share your I2C code for STM32F0? Thanks a lot in advance, Peppe.