It's my first post on this forum.
I encounter some difficulties to use I2C bus using B10 and B11 pins on a NUCLEO-WB55 board and a custom STM32WB55 board.
I'm using MicroPython version v1.13-94-g817b89a10-dirty (NUCLEO-WB55 port).
Using NUCLEO-WB55 board and an I2C MPU device (BMP280), I can observe different behaviors according to pins used:
- SCL on 'B8' and SDA on 'B9' (corresponding to I2C1 in NUCLEO_WB55/mpconfigboard.h)
Code: Select all
import machine i2c = machine.I2C(1) # I2C1 i2c.scan() # => OK, return [118] i2c = machine.SoftI2C(scl=machine.Pin('B8'), sda=machine.Pin('B9')) i2c.scan() # => OK, return [118]
- SCL on 'C0' and SDA on 'C1' (corresponding to I2C3 in NUCLEO_WB55/mpconfigboard.h)
Code: Select all
import machine i2c = machine.I2C(3) i2c.scan() # => OK, return [118] i2c = machine.SoftI2C(scl=machine.Pin('C0'), sda=machine.Pin('C1')) i2c.scan() # => OK, return [118]
- SCL on 'B10' and SDA on 'B11'
Code: Select all
import machine i2c = machine.SoftI2C(scl=machine.Pin('B10'), sda=machine.Pin('B11')) i2c.scan() # => KO, return []
- SCL on 'C0' and SDA on 'B11'
Code: Select all
import machine i2c = machine.SoftI2C(scl=machine.Pin('C0'), sda=machine.Pin('B11')) i2c.scan() # => OK, return [118]
- SCL on 'B10' and SDA on 'C1'
Code: Select all
import machine i2c = machine.SoftI2C(scl=machine.Pin('B10'), sda=machine.Pin('C1')) i2c.scan() # => KO, return []
Note : In STM32WB55 datasheet document, I2C3_SCL is contained int he list of alternate functions of PB10 pin.
Is someone have an idea ?
Thank in advance for your help.