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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
430 Views
JiShufan9
Contributor II

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

JiShufan9_0-1701077710801.png

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

JiShufan9_1-1701077782273.png

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

谢谢!

0 Kudos
Reply
1 Solution
417 Views
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.
-------------------------------------------------------------------------------

View solution in original post

2 Replies
418 Views
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.
-------------------------------------------------------------------------------

394 Views
JiShufan9
Contributor II
感谢解答,问题已得到解决
0 Kudos
Reply