I’m using Logic 2 to capture I2C communication just before the red LED on my device switches on. I have the SDA, SCL and ground connected in addition to the red LED. Data capture could go on for days before the LED switches on but the Logic 2 software either crashes or stops capturing data. Logic 2 is set in trigger mode and is to trim data to 120 s before trigger and capture 120 s after the trigger. I already tried lowering the sample rate and playing around with the numbers without success.
@Hussain Sorry to hear about that! Can you share your machine ID with us? We can take a look at any uploaded error messages your PC may have sent to us at the time of the errors.
Also, can you confirm roughly how long the recording goes on for (on average) before the error appears that causes it to prematurely end?
Our software is typically not be able to capture for several hours in length with 100% reliability. Because of this, we suggest some of the workarounds listed below for long overnight captures (one of which utilizes automation to save smaller sessions to the hard drive).
@Hussain do you really need the analog data, or is the digital only info good enough?
The analog data can fill up your capture buffer / memory and slow down your PC for big captures as the RAM fills up or Logic 2 falls behind real-time processing and starts buffering.
A digital only capture can take a lot less memory, especially for I2C. I’d recommend capturing the least amount of analog (fewest channels) and at the lowest rate you can tolerate. Note: if minimizing the analog sample rate, you may want to disable the analog filtering, per this thread:
… but that requires hacking your calibration file (see example python script attached to thread above).
Otherwise, you’ll want >10X sampling vs. highest frequency content, (e.g., >4 MS/s for a 400 kHz I2C clock frequency) to get decent analog resolution, or higher if needed. Unfortunately, the higher sample rate increases risk of unstable capturing if the PC isn’t able keep up.
If the event is occuring rarely (long time to trigger), then you may also want to optimize the PC’s performance to help stability of longer sessions, per this support article:
Key points:
Minimize usage of (or just remove) other USB devices on PC
Stop running any other applications
Make sure USB port, CPU, and SSD/HDD are all ‘always on’ at max performance, with no sleep/power save settings features enabled
Direct connect to PC USB port (no hub), and use a high quality USB3 cable
Maximize RAM available, and make sure disk isn’t full (fast SSD storage preferred)
Make sure capture buffer size in logic is big enough (but not set too big, as it should act as FIFO while waiting for trigger)