IRNAS / ppk2-api-python

Power Profiling Kit 2 unofficial python api.
http://irnas.eu
GNU General Public License v2.0
145 stars 37 forks source link

Unable to use Ampere mode #14

Closed karthik-gunturi closed 1 year ago

karthik-gunturi commented 2 years ago

Observing below issue. LED not blinking blue after setting ppk2_test.use_ampere_meter()
Is it tested for Ampere mode? Log : Found PPK2 at COM3 Using Ampere mode Traceback (most recent call last): File "C:\Users\test\Downloads\ppk2-api-python-master\example.py", line 25, in ppk2_test.start_measuring() # start measuring File "C:\Users\test\Downloads\ppk2-api-python-master\src\ppk2_api\ppk2_api.py", line 237, in start_measuring raise Exception("Input voltage not set!") Exception: Input voltage not set!

wlgrd commented 2 years ago

Exception: Input voltage not set! The exception message is telling you the problem. You need to set an approximate input voltage even though you are using the ampere meter mode, first.

sforconi commented 1 year ago

Hi @wlgrd, first of all thanks for your work and to have released this code. I also have encountered this message while testing this library / software.

I have looked into the code and I see that the current_vdd value must be set in both cases: Source Mode and Ampere Mode (for Source Mode it is the VOUT voltage provided from the PPK2 to the test board, while for Ampere Mode it should be the VIN voltage provided externally to the test board).

When in Source Mode, setting this value is logical and straightforward, but for Ampere Mode, this is not so clear. In particular, looking at the Nordic nRF Connect for Desktop - Power Profiler GUI interface, when you set MODE = Ampere, you are not requested to set an input voltage, so I expect that the PPK2 is able to detect the VIN input voltage in some way... do you know if this is possible?

BR Samuele.

wlgrd commented 1 year ago

Hi @sforconi. First of all, IRNAS has been the main driver behind this port so I will not take too much of the credit :) Secondly, I saw you got your answers here https://github.com/NordicSemiconductor/pc-nrfconnect-ppk/issues/284. Sorry for being late to the party. The plan is of course to let the firmware of the PPK2 report the voltage when in ampere meter mode, but as of right now this will impact the measurement speed so I need to look more into it when I have time. Unfortunately, this is not a priority right now, but I will get to it eventually. I am closing this issue as @karthik-gunturi hasn't given more updates so I expect this is solved.