msoon / PyMonsoon

Monsoon Power Monitor Python Library
MIT License
55 stars 23 forks source link

[HV Power Monitor] can't run in Linux with 32 Firmware #29

Open polo000 opened 5 years ago

polo000 commented 5 years ago

When I setup for voltage and it failed as following error msg. but it's workable with previous firmware version.

Polo:~/power/monsoon_hvp$ chmod +x monsoon_hvp.par Polo:~/power/monsoon_hvp$ ./monsoon_hvp.par --startcurrent 8 Set start current to 8.0 Polo:~/power/monsoon_hvp$ ./monsoon_hvp.par --current 8 Set runtime current to 8.0 Polo:~/power/monsoon_hvp$ ./monsoon_hvp.par --voltage 4.2 Traceback (most recent call last): File "<embedded module '_launcher'>", line 168, in run_filename_from_loader_as_main File "<embedded module '_launcher'>", line 33, in _run_code_in_main File "/usr/local/google/home/Polo/power/monsoon_hvp/monsoon_hvp.par/google3/java/com/google/android/testing/powertools/monsoon_controller/monsoon.py", line 264, in main(FLAGS(sys.argv)) File "/usr/local/google/home/Polo/power/monsoon_hvp/monsoon_hvp.par/google3/java/com/google/android/testing/powertools/monsoon_controller/monsoon.py", line 95, in main SetVoltage(mon, FLAGS.voltage, FLAGS.ramp) File "/usr/local/google/home/Polo/power/monsoon_hvp/monsoon_hvp.par/google3/java/com/google/android/testing/powertools/monsoon_controller/monsoon.py", line 134, in SetVoltage mon.setVout(voltage) File "/usr/local/google/home/Polo/power/monsoon_hvp/monsoon_hvp.par/google3/third_party/py/Monsoon/HVPM.py", line 53, in setVout self.checkDacValues() File "/usr/local/google/home/Polo/power/monsoon_hvp/monsoon_hvp.par/google3/third_party/py/Monsoon/HVPM.py", line 159, in checkDacValues self.__checkDacCalLow(dacCalLow) File "/usr/local/google/home/Polo/power/monsoon_hvp/monsoon_hvp.par/google3/third_party/py/Monsoon/HVPM.py", line 164, in __checkDacCalLow raise ValueError("dacCalLow out of tolerance. Recommend running HVPM.calibrateVoltage()") ValueError: dacCalLow out of tolerance. Recommend running HVPM.calibrateVoltage()

msoonjared commented 5 years ago

There was a bug in the code a while back which had an incorrect dacCalLow check value which was fixed, double check what that value is in your HVPM.py file. The correct value(s) for dacCalLow should be: value <= 0xD000 or value >= 0xF000, originally the lower bound was 0xE000 which resulted in the error you are seeing being thrown.

If that doesn't fix it shoot an email to pmsupport@msoon.com and we'll take a look at what else might be causing the issue.