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é

Parents Reply Children
  • Hello,


    Actually, yes. I hope I have remembered this correctly. First of all, I switched back from the multiprocessing version (PPK2_MP) to the normal version (PPK2_API). I also added a line of code (see this pull request: github.com/.../40) to keep the states on the PPK2 clean. Also, I added some delays to my code before establishing a new connection after terminating a previous one. This caused one subprocess to terminate correctly, really resetting the PPK2 to be ready for the start of the next subprocess. I suspect that there was some interference at this point.


    Hope this helps! If not, let me know, maybe I can think about it again.


    Best regards, René

Related