I have an updated script for you to try.
Somewhere between 1500 and 4000 captures, the Logic 2 application will crash. This is what causes the gRPC error.
I tried the following, without success:
Removing all other USB devices connected to the PC
Commented out the save_capture function call, so its not saving or exporting anything
In the new script, I added a recovery mechanism to relaunch the Logic 2. This makes sure that the test will run all the way through to 4000 captures.
I also noticed that the capture time increases through out the test. I plotted the time taken per capture against the capture number in the attached image. Just before the application crashes, the captures are taking a long time, anywhere between 5 and 10 seconds (it’s set to do a 0.2S capture).
test_saleae.py (4.6 KB)