cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to select PB6 for I2C1_SCL on STM32F103C8

technofection
Associate II

Hi,

Trying to use I2C1 with REMAP=0 and as long as understand the SCL and SDA pins are PB6 and PB6. Along with I2C I am using some other peripherals as well. I am unable to select PB6 for I2C SCL PIN. Please see attached screenshot. Not sure why it wont let me select that default PIN. I am quite sure I am not using any other MASKED function for this PIN.

technofection_0-1729854964045.png

 

8 REPLIES 8
RobK1
Associate II

If you select 'I2C under "Mode", the pins will automatically be selected.

 

 

RobK1_1-1729856252731.png

 

technofection
Associate II

Hi Rob,

I do expect the same behaviour, but as soon as I enable I2C1, the REMAPPED pins are selected automatically. Please see the screenshot...

technofection_0-1729857052027.png

Hello @technofection and welcome to the ST Community.

Please add your .IOC file here so I can check. It works fine on my side.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

technofection
Associate II

Hi @STTwo-32 Here is the ioc file ...

The F1 was always a headache, your have to remap pins as a group (for the peripheral), and unmap other potential users from their group of pins.

The errata may high-light some of these. With SPL it was always a battle. Subsequent designs allowed for pin level mapping/muxing

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello @technofection 

As said @Tesla DeLorean , there is an errata about that. The errata 2.3.7 of the ES096 Rev15 says that:

When the following conditions are met:
• I2C1 and SPI1 are clocked.
• SPI1 is remapped.
• I/O port pin PB5 is configured as an alternate function output
there is a conflict between the SPI1 MOSI and the I2C1 SMBA signals (even if SMBA is not used).

And the workaround is:

Do not use SPI1 remapped in master mode and I2C1 together.
When using SPI1 remapped, the I2C1 clock must be disabled.

So, if you are remapping the SPI1, the I2C1 should not be used as said on the errata. 

I've escalated this to our MX Team so they can ensure the correction (under internal ticket number 195083).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks for pointing to that.. That makes sense.  So basically, CubeIDE must disable I2C1 and I2C2 completely if SPI1 is remapped, as PB5 is common (SMBA Pin). Is that correct?

Just I2C1.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.