This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0L1105: Sharing SPI and I2C bus

Part Number: MSPM0L1105

Hi.

Can we use the same pin to connect an slave IC with SPI interface and same bus to connect an another IC with I2C interface? I see within the datasheet that the pin configuration can be changed to use both type of interfaces and considering that both slave ICs have a chip select or can be turned off we could manage to communicate with each IC while the other is off.

Can the internal pull up resistor be used for the I2C? Or would you recommend an external pull resistor? I understand that the internal pull up resistor is a bit high for I2C, but I would like to know if it can be used or not.

Thanks

  • I recommend you not try to mix SPI and I2C peripherals on a bus. I2C uses in-band (SLA byte) addressing, vs the SPI's /CS addressing. If the SPI target happens to send just the right combination of bits on POCI (nee MISO) the I2C target might wake up and try to wiggle the wires, leading to electrical as well as logical conflicts.

    You can probably use the internal pullups on an I2C, if you keep the clock slow and the wires short. As you mention, the pullups aren't very strong, so the edges will be slow and sloppy. But it will probably be OK for a desktop experiment.

  • Hi Francisco,

    I Agree with Bruce's description.

    It seems no hardware conflcts if you mix the both interface. You can use CS signal to close SPI slave, but for I2C slave, it always recieve the signal. So there may be some concerns about logical conflicts.

    The internal resisitor is 40k and can used for the I2C, but make sure enable pull-up resistor firstly and then use I2C module.

    B.R.

    Sal

  • Thank you both for your interesting answers.

    I also came up with another idea: we could connect external pull-ups to a MCU IO instead of VCC directly. Then when the I2C needs to be used, we configure as high output but when we don’t use it we configure it as input avoiding any conflict.

    We would be using the same mentioned IO to power up the I2C device. So the I2C bus won’t be aware of any data because the device would be off


    What do you think?