I2C1 stops working

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

I2C1 stops working

跳至解决方案
1,720 次查看
mehdikarimibiuk
Contributor V

n/a

标签 (1)
标记 (4)
1 解答
1,534 次查看
mehdikarimibiuk
Contributor V

Yes, there is a mux on the way to those i2c register banks, so first I selected the mux address using 7-bit addressing, then I wrote to the control register of the mux to select the first line (it is a 1:4 mux), and then I selected which register bank I want to write in (on each line there are two register banks)....then since these register banks are having indirect addressing, I selected the pointer at location 0, meaning I want to read from address zero of register bank, and last but not least, I started to read from it.

I think the sequence is correct that I used, since I am getting correct data back.

I think that the problem was with hardware/PCB. I had a new hardware coming in and not experiencing this issue anymore with the new hardware as of yet. The reason that I2C was going down after a while or not responding could be due to that. I keep this updated if I see a similar behavior again on I2C.

Thanks

Mehdi

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,534 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Mehdi Karimibiuki,

I think your code should be fine, maybe your issue is related with the I2C device end, would you please clarify the process that you attempt to implement? Is it a register writing followed with a reading?

Thanks for your patience!!


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,535 次查看
mehdikarimibiuk
Contributor V

Yes, there is a mux on the way to those i2c register banks, so first I selected the mux address using 7-bit addressing, then I wrote to the control register of the mux to select the first line (it is a 1:4 mux), and then I selected which register bank I want to write in (on each line there are two register banks)....then since these register banks are having indirect addressing, I selected the pointer at location 0, meaning I want to read from address zero of register bank, and last but not least, I started to read from it.

I think the sequence is correct that I used, since I am getting correct data back.

I think that the problem was with hardware/PCB. I had a new hardware coming in and not experiencing this issue anymore with the new hardware as of yet. The reason that I2C was going down after a while or not responding could be due to that. I keep this updated if I see a similar behavior again on I2C.

Thanks

Mehdi

0 项奖励
回复
1,534 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Mehdi Karimibiuki,

That's great!! Please kindly let me know if you have any further issue.


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------