Hi all,
the SDK drivers for I2C are working fine if each I2C peripheral has its own IRQ but, in the the case of KM35 the two I2C are handled by the same IRQ and when both the peripherals are in use the driver is not checking from where the IRQ is coming and the CPU gets an error.
Does anyone have a patch for this?
Thank you very much
Francesco
As you mentioned, both I2C0 and I2C1 are handled by the same IRQ, because they share a single OR'ed I2C interrupt. I don’t know of a viable patch for this other than using a I2C-bus multiplexer like the PCA9542A. This device multiplexes between two I2C buses, generating a single interrupt that can be handled by the OR'ed I2C interrupt of the KM35, while selecting the correct I2C bus for said interruption. Basically, it should remove the need to use both I2C peripherals on the MCU. Here’s an Application Note for the PCA954X Family. Perhaps you will find one of these devices to be useful for your inquiry: https://www.nxp.com/docs/en/application-note/AN262.pdf
I hope this helps,
Edwin.