@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)