We are receiving signals from hardware components that we need to measure very precisely down to the millisecond. It is all working very well until a minor freeze occurs roughly about once every 3 to 4 hours, which typically lasts 100 to 500 ms but occasionally we have seen it as high as 3900 ms. During this time the pi seems to be unresponsive and shortly after all signals that came in during the freeze are received almost instantaneously and that confuses our program.

We are using the latest raspbian lite without pretty much any custom settings apart from our program, which is written in javascript and is managed via pm2. We do not have any usb devices, screen or any other modules that are drawing any current. We are using a 2A power supply and a class 10 sdcard.

We are looking for a way to determine what is causing this lag and a proper way to fix it without introducing hacky solutions in our program.

  • raspbian, like most other linux/unix/posix systems has log files in /var/log that may help debug issues like this - look through them to see what may be causing the problem - though, to be perfectly honest, raspberry pi (or any current linux based system) probably isn't a good choice for such precise measurements - unless the kernel is built with CONFIG_PREEMPT_RT, which is NOT the case for raspbian – Jaromanda X Feb 20 '19 at 9:34
  • @JaromandaX sadly there is nothing in the logs that would raise any concerns In the exact moment when this happened there is nothing logged at all in any system logs. Unfortunately we will have to just implement some software workaround I guess.. – php_nub_qq Feb 20 '19 at 11:27
  • receiving signals from hardware components - how are these signals received? what are these signals? – Jaromanda X Feb 20 '19 at 11:37
  • @JaromandaX just rising signals on the GPIO pins, not even using any protocol it's very basic communication. – php_nub_qq Feb 20 '19 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.