DWQA QuestionsCategory: PiCapture SupportPicapture card seems to lock up after 100 … 400 raspistill cpmmands
Bruno Scheffold asked 2 months ago

I am running the Python-code on a RPI3 with a raspistill command ‘raspistill -md 6 -t 500 -n -o -‘ in a loop to detect movement in the NTSC Videostream from an Infrared Camera (480x320Pixel / 60fps). Everything works fine until after aprox. 100 .. 400 commands (aprox. 100 … 400 seconds) it seems that the SD1 card locks up an can only be restartet with a complete power down. (To exclude any defect of the RPI3 i did the same with a regular raspi-cam at the CSI camera connector and could not find this error). In order to fix the problem i totaly reduced the Pyton program into a single loop with this single raspistill command ‘raspistill -md 6 -t 500 -o -‘ or alternatively ‘raspistill -md 6 -t 500 -o test.jpg’ and got this “hang-up” again after several hundred calls (several minutes).
In this error state the LEDs of the SD1-board show the following status:
blue-LED: constantly lit  (same during regular operation)
green-LED (close to the blue one): constantly lit (was flickering during regular operation in time with the acquisition of frames before) 
red-LED: constantly dark (was lit with short interruptions during regular operation in time with the acquisition of frames before)
LED 0: flashing (same as during regular operation)
LED 1: constantly lit (same as during regular operation)
Any idea what i should do?
 

1 Answers
mwlinder Staff answered 2 months ago

When you say that the system “locks up” are you still able to communicate with the PiCapture card using PiVideo?   I suggest using the PiVideo command “pivideo -q all” to see if it is responding.  
The Red LED is under direct control of the Raspberry Pi, and indicates that it is trying to access the camera.  If it remains dark, then the RPi is not even trying to get video.  The short flashes you see when it is operating normally are the times that the PiCapture card is being accessed.
From your description of the LED status, it seems that the PiCapture card is continuing to operate normally, but that there is some other problem in the system.  This could be the raspistill program, the camera drivers, or something else.   If the PiCapture card was really “hanging”, you would see an error message when the RPi attempted to access it.
While the system is “locked” can you open another command window and run raspistill or raspivid?  
It is possible that you are running into a file system issue.   With a flash-based file system on the SD memory card repeatedly writing to the same file you could have times when there are “pauses” for file system housekeeping.  These can cause an issue when you are attempting to re-write the file with a new iteration of raspistill.
There are a variety of approaches for resolving these kinds of issues, but the first step is to determine what is really hanging.

Bruno ScheffoldPicapture card seems to lock up after 100 … 400 raspistill cpmmands