PPK2 with Python API causes error (PPK2 blinking red)

Hi everyone!

Setup:

Currently, I am using the nRF52840 DK board to evaluate neural network models directly on the nRF microcontroller. To measure the power consumption when running a model, I use the PPK2. Since I want to optimize my models, I evaluate them all in runs of several hours. To fully automate this, I use the PPK2 Python API (multiprocessing version, i.e. PPK_MP class) within a newly started subprocess to measure the power for a model when I start inference on the nRF52840 from another process. I am using the PPK2 Python API as described in the documentation.

Problem:

The previously described procedure works fine for several hours. At some point (I could not reproduce it on purpose) the PPK2 starts blinking red rapidly and does not work at all. My question now is if anyone has experienced similar behavior or even has a solution so that this will no longer happen.

Please let me know if you need more information. Thank you already for your help!

Best, René

  • Hi,

    Do you only see this issue when using the IRNAS PPK_MP class API? As this API is not developed by Nordic, you might need to check with the developers if they have seen this issue.

    How frequently/rapidly does the red blinking occur? Do you need to reset the PPK to get it back to normal operating mode, or is it sufficient to stop/restart the script? It could sound like two instances are racing for access to the serial instance, as it will reboot at disconnect. Do you have any information about what the script is doing when the issue occurs?

    Best regards,
    Jørgen

  • Hi,

    I am also facing similar issue with PPK2. We are measuring current of the device in automation system where it keep measure current of devices for 2-3 days at frequency of 1 mins. But noticing that after running for few hours randomly PPK2 device starts blinking red and cannot be connected on USB again. Manually powering off and thne on fixes this issue. But for automoation test we dont want to do this. Any suggestions to fix this, so no manual intervention is required.

    Thanks

    Rishi

  • Hi,

    We do not have any suggested fix, as we do not know what the problem is. The IRNAS API is not developed by Nordic, so you should contact the developers if you face issues with this API that do not show with Nordics normal applications for the PPK2. Did you consider my previous suggestions?

    Best regards,
    Jørgen

  • However, the blinking red LED is a behavior most likely defined by the device firmware. the IRNAS API is open source, and the best thing available to automate usage of the PPK2. It is based on what can be observed from nRF Connect for Desktop. Until we know what causes the blinking red LED -- which is knowable only by Nordic Semi -- we can't begin working on fixing the code.

    Could you please help us find out what some of the possible causes for the red LED blinking is? Green appears to mean device is available, red means connected. What is flashing red?

  • According to the developers, the only state of blinking red LED is during DFU (firmware updates). You can check if the blinking corresponds with the blinking visible if you open nRF Connect for Desktop Programmer application and selects the PPK2 in the list of devices. You can also check if the PPK enumerates as "nRF52 SDFU USB" in the device manager when this issue occurs, or "nRF Connect USB CDC ACM".

Related