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!