SDK I2C driver IRQ issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SDK I2C driver IRQ issue

976 次查看
Francesco_Ferrari
NXP Employee
NXP Employee

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 

0 项奖励
回复
1 回复

965 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

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.

0 项奖励
回复