PPK2 python API bad reading on Ubuntu/Raspbian

Hi all!

I'm facing issues during the development of an "auto tester" that should run on a Raspberry Pi using the python API. For testing, I've also tried on a normal Ubuntu PC, and get the same results than the Pi.

The problem that I'm facing is with the readings, sometimes it get spikes down to 0, even when triying with a simple resistor.

On the following images you can see the diference between the first one is taken on the Ubuntu PC, and the other on a Windows PC.

.

The second one is more "sharp" without the spikes to 0 and much less noisier, also, some data is missing. For the record, is the exact same code executed on two same kind of PC (same hardware) but diferent OS.

If I try with a simple resistor, get the same result, lots of spikes to 0.

It can be how it's handled the serial ports by linux? Or, maybe, the API is not well optimized for Unix systems?

  • Hi,

     

    I can see that there is a difference in the two plots, but I am quite uncertain which is "bad" and which is "good"

    The problem that I'm facing is with the readings, sometimes it get spikes down to 0, even when triying with a simple resistor.

    Can you share information about how you run this specific test? ie. how you connect it, which mode the ppk2 is in, and what your measured results are?

     

    Kind regards,

    Håkon

  • Hi Håkon,

    The first image is the "bad" one.
    The test is made using the PPK2 as source meter, using a voltage of 3600mV, conecting the device directly to the PC over a USB cable.

    The two results should be the same, but you can see that the first one has lots of noise and spykes, not only to 0, also some of them really high.

    The device I'm testing is a microcontroller making the same operation over and over, monitoring it from the App on Windows and always get the same result and graph, but on Linux systems, the results are never the same, no consistency.

  • Hi,

     

    For Linux, we have done testing on ubuntu (which I'm running, on a Intel based system) and I have not seen these types of issues myself. There has been problematic hardware, for instance USB issues seen on some AMD AM4 motherboard BIOS versions (google "amd usb issues"), but most of these has been ironed out in the last years.

     

    If the second one is the golden sample, the first one looks to be missing around 10% of the samples when looking at the timeline at 3000 (where the first spike should appear).

    On the bad one this spike happens after ~2700 samples. 

    This can happen if you connect the PPK2 via. a USB hub, or have other USB devices running simultaneously which has higher priority on the same usb controller.

     

    Ubuntu PC

    Could you try to run the Power profiler in nrf connect for desktop on this PC to see if you see the same issue? feel free to attach the .ppk trace to this thread as well.

     

    Kind regards,

    Håkon

Related