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.

RM48L952: MIBSPI3 interaction with I2C?

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Hello,

I've been having problems with the I2C peripheral on our project. During initialisation, some I2C write commands are sent to some slave devices to configure them - all bytes are acknowledged correctly by the slaves. After that, the SPI peripherals are initialised. However, it appears that the I2C slave devices stop responding after calling the HALCoGen mibspiInit() function. Any further writes to the I2C slaves are not acknowledged although the SCL and SDA lines look normal on a logic analyzer. The I2C initialisation also fails if I move it after the SPI initialisation. If I comment out the mibspiInit() function, the I2C devices continue working fine.

The only link I can think of is that some of the MIBSPI3 pins are multiplexed with the I2C lines and we are using the other MIBSPI3 pins as GPIO. The pinmux in HALCoGen is definitely set to use the I2C function for the SCL and SDA pins. The two pins are set as inputs on the MIBSPI3 port tab.

Is there any way the SPI configuration could be interfering with the I2C bus?

Thanks

  • Hello Will,

    I believe the init of the Mibspi pins is impacting the state of the I2C pin configuration. i.e., you initialize the MibSPI3nCS_2 and MibSPI2nCS_3 pins as GPIO INPUTS and I assume this has the default pull values as well. Please try initializing as appropriate for I2C. i.e., INPUT, PULL UP, Open drain and see if this helps.
  • Hi Chuck,

    Many thanks for the suggestion. I've tried changing the settings as you've suggested but didn't see any improvement.

    Looking at the signals on the scope, it appear we might have too much capacitance on the bus lines. Slowing down the clock speed has helped. However it still seems strange that initialising the MIBSPI would affect the I2C. As the pinmux is set to use I2C, shouldn't the SPI pin settings be irrelevant? Is this behaviour documented anywhere? I'm now wondering if any other pins/functions might be working marginally depending on the settings for alternate functions.

    Kind regards,

    Will

  • Hi Chuck,

    I've done some further investigation and found the I2C issue is not related to MIBSPI3, but caused by an incorrect GPIO pin configuration for MIBSPI5 - inputs set as outputs. These pins aren't related to the I2C bus or devices, but correcting the configuration has resolved by I2C issue.

    Many thanks,

    Will
  • Hi Will
    I am auditing a few older forum posts that were potentially not resolved. Since it has been a while since this post was open and eventually locked, I wanted to check if you were able to resolve the issue or need further guidance?


    Regards
    Mukul