I2C1 in Nucleo-F411RE does not work
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
I2C1 in Nucleo-F411RE does not work
I try I2C1 in Nucelo F411RE board, with PB6/PB7 pin, but it is not work, return nothing. Same code is working fine in I2C2.
Re: I2C1 in Nucleo-F411RE does not work
I don't see anything that would explain why it shouldn't work.
Are you using the latest firmware?
Did you add pullup resistors?
After you've configured I2C1 could you tell me what the output of the following is:
Are you using the latest firmware?
Did you add pullup resistors?
After you've configured I2C1 could you tell me what the output of the following is:
Code: Select all
pyb.Pin('B6')
pyb.Pin('B7')
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: I2C1 in Nucleo-F411RE does not work
I connect NUCLEO-F411 board with a RTC module (DS3231) with external 3.3K pullup resistor. I write a simple test as below, when I use I2C1, it will return nothing, but when I change to I2C2, it works fine.dhylands wrote:I don't see anything that would explain why it shouldn't work.
Are you using the latest firmware?
Did you add pullup resistors?
After you've configured I2C1 could you tell me what the output of the following is:Code: Select all
pyb.Pin('B6') pyb.Pin('B7')
Code: Select all
from pyb import I2C
i2c = I2C(2, I2C.MASTER, baudrate=100000)
def test():
i2c.send(0, 104)
b = i2c.recv(1, 104)[0]
print(int(b/16),b%16)
while True:
test()
pyb.delay(500)
21
22
23
24
25
26
27
28
29
30