-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max measurement time restricted to 60s. #31
Comments
@Siddarth-Manja could you please provide a code snippet demonstrating your use case? I have tried it with import time
from ppk2_api.ppk2_api import PPK2_MP as PPK2_API
ppk2s_connected = PPK2_API.list_devices()
if(len(ppk2s_connected) == 1):
ppk2_port = ppk2s_connected[0]
print(f'Found PPK2 at {ppk2_port}')
else:
print(f'Too many connected PPK2\'s: {ppk2s_connected}')
exit()
ppk2_test = PPK2_API(ppk2_port, buffer_max_size_seconds=70, buffer_chunk_seconds=61)
ppk2_test.get_modifiers()
ppk2_test.set_source_voltage(3300)
ppk2_test.use_source_meter() # set source meter mode
ppk2_test.toggle_DUT_power("ON") # enable DUT power
ppk2_test.start_measuring() # start measuring
# measurements are a constant stream of bytes
# the number of measurements in one sampling period depends on the wait between serial reads
# it appears the maximum number of bytes received is 1024
# the sampling rate of the PPK2 is 100 samples per millisecond
while True:
read_data = ppk2_test.get_data()
if read_data != b'':
samples = ppk2_test.get_samples(read_data)
print(f"Average of {len(samples)} samples is: {sum(samples)/len(samples)}uA")
time.sleep(0.001) I get the expected measurement buffer, The output:
|
I will try modifying the buffer_chunk_seconds and run the script. |
I have used this script and automated my tests and I have been measuring current for 60s. When I tried to change the duration to anything above 60s it fails. I tried to make this change by increasing the buffer_len_s and buffer_max_size_seconds. Please let me know if there is any other way to do it.
The exact issue I observed while increasing it past 60s was the PPK2 would start measuring and then it just gets stuck there and does not terminate at all. I then have to force close the terminal and re run the test.
The text was updated successfully, but these errors were encountered: