Page 1 of 1

Raspberry freeze

Posted: Mon Feb 11, 2013 11:11 am
by mathiask
Hi,

I've got a problem with my new raspberry pi B rev 2. The system freezes and I really cant figure out why. I've got the newest raspberry wheezy image installed, apache server + php5 + mysql, node, screen. All working like a charm but i cant run the system a long time. Hardware attatched to the pi is an ethernet cable + a FTDI USB Device. Power supply is a 5V 1200mAh. SD Card: Transcendend 16Gb SDHC

I am running a node app that reads the USB FTDI Device and I think there is the problem. The kern.log shows

Code: Select all

Feb 11 06:24:48 raspberrypi kernel: [25917.910292] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000014
Feb 11 06:24:48 raspberrypi kernel: [25917.910327] smsc95xx 1-1.1:1.0: eth0: Fai
led to write HW_CFG_LRST_ bit in HW_CFG register, ret = -110
Feb 11 06:24:54 raspberrypi kernel: [25923.909831] smsc95xx 1-1.1:1.0: eth0: Fai
led to write register index 0x00000014
Feb 11 06:24:54 raspberrypi kernel: [25923.909866] smsc95xx 1-1.1:1.0: eth0: Fai
led to write HW_CFG_LRST_ bit in HW_CFG register, ret = -110
Feb 11 06:25:00 raspberrypi kernel: [25929.909364] smsc95xx 1-1.1:1.0: eth0: Fai
led to write register index 0x00000014
Feb 11 06:25:00 raspberrypi kernel: [25929.909397] smsc95xx 1-1.1:1.0: eth0: Fai
led to write HW_CFG_LRST_ bit in HW_CFG register, ret = -110
Feb 11 06:25:06 raspberrypi kernel: [25935.908957] smsc95xx 1-1.1:1.0: eth0: Fai
led to write register index 0x00000014
Feb 11 06:25:06 raspberrypi kernel: [25935.908991] smsc95xx 1-1.1:1.0: eth0: Fai
led to write HW_CFG_LRST_ bit in HW_CFG register, ret = -110
Feb 11 06:25:12 raspberrypi kernel: [25941.908435] smsc95xx 1-1.1:1.0: eth0: Fai
led to write register index 0x00000014
Feb 11 06:25:12 raspberrypi kernel: [25941.908469] smsc95xx 1-1.1:1.0: eth0: Fai
led to write HW_CFG_LRST_ bit in HW_CFG register, ret = -110
[email protected] /var/log $
regards
mathiask

Re: Raspberry freeze

Posted: Mon Feb 11, 2013 11:26 am
by ski522
If you remove the FTDI USB Device does it still lock up? The log file would seem to indicate a problem with the USB port since Ethernet is tied into the USB core. This is a software issue, not hardware. Search for the "usb redux" thread for more info.

Re: Raspberry freeze

Posted: Mon Feb 11, 2013 11:37 am
by shuckle
It might be worth trying to add

Code: Select all

smsc95xx.turbo_mode=N
to the end of

Code: Select all

 /boot/cmdline.txt.
That helped me to get stability.

Re: Raspberry freeze

Posted: Mon Feb 11, 2013 12:37 pm
by mathiask
shuckle wrote:It might be worth trying to add

Code: Select all

smsc95xx.turbo_mode=N
to the end of

Code: Select all

 /boot/cmdline.txt.
That helped me to get stability.
I read this solution in a couple of threads, but there is often the problem a huge amount of network load. But my ethernet idles most of the time and the USB Device only writes/reads about 20 Bytes per Minute. But I will try this solution!

Re: Raspberry freeze

Posted: Mon Feb 11, 2013 4:02 pm
by skingchico
I am doing some testing based the information from this link.

http://www.raspberrypi.org/phpBB3/viewt ... 5&start=25

I pasted the perl script shown and made it executable. In my /etc/rc.local file I added a line

/home/perlscript & # Run the perl script without wait.

The perl script just opens the USB serial device and then loops forever.

Since my Pi freeze is at a random time, and I have only been running this test for 10 hours, I am not convinced it fixes my freeze but am optimistic. More experimenters would help.

Steve

Re: Raspberry freeze

Posted: Mon Feb 11, 2013 9:09 pm
by mathiask
I found a related thread for my issue and as I see it's not solved yet. http://www.raspberrypi.org/phpBB3/viewt ... &start=100

I will try to force USB 1.1 and hope this will temporarily solve the problem until a fix will be available.

Added

Code: Select all

dwc_otg.microframe_schedule=1 dwc_otg.speed=1 dwc_otg.fiq_fix_enable=1 smsc95xx.turbo_mode=N
to /boot/cmdline.txt

For now I can say that my USB Keyboard is not working anymore with this settings, but thats no problem. The FT232 Chip is important for me. Lets give it a try...waiting for the next freeze ;)

Re: Raspberry freeze

Posted: Wed Feb 13, 2013 10:29 am
by evandavey
I'm having the exact same issue using http://www.enocean.com/en/enocean_modules/usb-300-oem/ which also uses FTDI.

I've followed all the advice but keep getting random freezes. I'm using Python and the PySerial library. Monitoring system performance, my code does not seem to be stressing the PI at all (under 10% utilisation of CPU, plenty of free memory etc.). My program is threaded (to allow data to be received while other functions are performed) but again this doesn't seem like it should be a problem.

I've tried powering it via a hub and that makes no difference.

Very frustrating as this is nearly impossible to debug as the random freeze time means I have to change something then try again for another X hours until another freeze.

Re: Raspberry freeze

Posted: Wed Feb 13, 2013 11:30 am
by mathiask
Hey try updating your kernel to 3.6.11+ like i mentioned in this thread http://www.raspberrypi.org/phpBB3/viewt ... 39#p285539. Now running for 37 hours without hanging.

Regards
mathiask

Re: Raspberry freeze

Posted: Wed Feb 13, 2013 12:19 pm
by mathiask
P.S.: I'm using the Enocean USB 300 aswell but using node to read it ;)

Re: Raspberry freeze

Posted: Thu Feb 14, 2013 4:27 am
by skingchico
Hey mathiask

I did the update this morning and, it does need to run longer, but after about 15 hours of continuous reading of my 1-wire sensors over the USB dongle, things are looking pretty sweet! The syslog no longer has "failed to read index 000114" or "failed to read index 000118" every 10 to 20 minutes. The update took a while to figure out and I did some serious backing up of my code and scripts before performing the kernel update. I did a "reboot" and the wireless network did not connect. But, a power cycle did the trick. I have thought I had this bug licked before but this is looking promising!

Again. A little early but thanks to you for posting this and thanks to whoever made the changes to the kernel.

Steve