0
\$\begingroup\$

is it possible to connect two I2C busses on one board, one at master mode and the other in slave. I am just trying to learn some I2C stuff, but I have only one board.

asked Jan 18, 2016 at 20:03
\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Yes.

The ST Micro STM32F429 datasheet says it has three I2C peripherals, so as long as the pins are available, you can connect them together, and use one as a master and the other as a slave.

If the pins of all three I2C peripherals are available, you could connect all three, and do a bunch of experiments to learn how to use I2C in multi-slave and multi-master configurations.

You should be quite careful about how interrupts are used. However, you can probably ignore using more than one interrupt, and still learn a lot.

There is an STM32F429-Discovery development board. If you are using that there are libraries to drive the peripherals. One is the older CMSIS-based STM32F429-Discovery Firmware, another is STM32CubeF4.

There are a bunch of low cost I2C slave devices. As suggested in the comments, there are I2C EEPROM chips, and I've used low-cost I2C temperature sensors (under one GCP), to test software.

answered Jan 18, 2016 at 20:30
\$\endgroup\$
1
  • \$\begingroup\$ As above, yes. However, I2C EEPROMs are pretty cheap and they are a known-working device so when you're debugging and it doesn't work, you know who to blame ;) I would not like to start from scratch implementing both endpoints, though you can certainly work towards that point with all three I2C peripherals connected together. \$\endgroup\$ Commented Jan 19, 2016 at 12:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.