S32K118触发外部中断后,I2C读取寄存器值异常

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

S32K118触发外部中断后,I2C读取寄存器值异常

跳至解决方案
768 次查看
JiShufan9
Contributor II

大家好,想请教个问题:使用S32K118做开发是,在触发外部中断后,使用I2C读取寄存器值,I2C_Clock信号异常,Clock一直为Low,如下图:

JiShufan9_0-1701077710801.png

我触发中断后调用的函数如下:

JiShufan9_1-1701077782273.png

大佬们帮忙看下这是为什么?我应该怎么去修改?

谢谢!

0 项奖励
回复
1 解答
755 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

不建议在中断服务函数里调用这些API。建议在ISR里仅给出标志,然后在状态机或者主循环里根据标志来启动I2C传输。


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
756 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

不建议在中断服务函数里调用这些API。建议在ISR里仅给出标志,然后在状态机或者主循环里根据标志来启动I2C传输。


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

732 次查看
JiShufan9
Contributor II
感谢解答,问题已得到解决
0 项奖励
回复