Today noticed somethig that I don’t uderstand…
I was receiving ADC gain too low error, so I tried to increase scope.gain.db value but I don’t see the plot increase the range of captured data, no matter what value I config the range was always between -0.1 and 0.1
I printed the gain.db value just before the trace being captured and just after the capture, and looks like it is always doing the capture at db=21, as after doing the capture the value is always back to 21
Something else must be touching the gain. Add a print(scope.gain.db) before and after anything that uses the scope object: reset_target(), scope.arm(), scope.capture(), and scope.get_last_trace().
Looks like the gain changes when you call reset_target(). Follow the code!
In Jupyter, if you run: reset_target??
you will get the actual code of the reset_target() function. There must be something in there that’s touching the gain. This shouldn’t be hard to pinpoint.
Problem fixed… I modified Setup_generic.ipynb to config the initial scope.gain.db to 21 as with 25 clipping errors appearch almost every time, but i did something wring and it overwrite that value each time the target is reset