Hi, I have two devices communicating via i2C. Both of them are based on MKE17Z MCUs and I am using SDK version 2.12 and fsl_lpi2c.
I used lpi2c_transfer as a reference for my development and the data exchange is correct, but my master device is resetting randomly after several seconds.When I check the reset reason I can see a kRCM_SourceLockup but I am stuck there as I do not know where this reset comes from...
I have been reading many different posts on i2C communication with NXP and trying several things, but so far, I have not found a solution...
Could you please shed some light in this?
Hello Pavel and thanks for your help. Let me try to explain a little bit better my scenario:
1. I am communicating via i2C two custom boards, both of them integrating MKE17Z
2. The behaviour is the same with and without a debug session
3. The master calls LPI2C_MasterTransferNonBlocking every 20 ms, alternating kLPI2C_Write and kLPI2C_Read operations
4. Format and length of the messages sent by each of the devices is always the same
5. Everything seems to be working fine but after several seconds (10,20, 30...) the master board resets and the reset reason reported is kRCM_SourceLockup
6. If I disable read transactions in the master, there are no resets. However, if I enable read and disable write transactions, the resets are there again.
7. I am using IEC 60730 Class B safety library in my project, which is in fact the base pillar of our code
If you need anything else, just ask. Thanks again!
Hello, could you tell me what example you are based on? and I have a doubt, are the messages is sending and received right in those 20ms? I suggest reducing the charge of the bus.
Best regards,
Pavel
Hi, I used interrupt_b2b_transfer from lpi2c driver examples (SDK FRDM-KE17 2.12) for both, slave and master although customised for my needs:
Hello, thanks for your information I´m afraid is not enough, could you attach an image from a sniffer of your communication? I want to review if the I2C receiver device has not halted the bus.
Best regards,
Pavel
Hello, my name is Pavel, and I will be supporting your case, I need more details about the behavior, only to understand when you say reset randomly is the board powered off on process? Do you have a FRDM board, or it is a custom board? I have the idea you are in a debug session because you notice that kRCM_SourceLockup, if you test it without a debug session is the behavior the same?
Best regards,
Pavel