Page 1 of 1

[SOLVED] Parallella freezes

PostPosted: Fri Jun 09, 2017 10:50 am
by gordon
I had written a code for the epihpany device few days ago. It was running fine, but since few hours whenever i run the code,it freezes and a blank screen appears. Is there a problem with my code? Here is the github link...

https://gist.github.com/dhanu-mamidi/1e ... d1112aee51

Please Help!

Re: Parallella freezes

PostPosted: Sat Jun 10, 2017 3:57 am
by GreggChandler
I did not spend too much time reading your code, but noticed that in file e_task1.c, function getmat(), you return a pointer to a variable allocated on the stack within function getmat(). That is not going to be reliable 'C' code. While you could return a pointer to a "static" variable allocated within your function, that is only because "static" variables are not allocated on the stack. With the variable declared "static" all invocations of the function would share a single allocated variable. This is really not so much an issue with the Parallella, but rather an issue with the 'C' programming language.

Re: Parallella freezes

PostPosted: Sun Jun 11, 2017 11:13 am
by olajep
Since the screen goes blank instead of locking up that leads me to believe that the board does not freeze, but is shutdown to protect itself from overheating.
Does the board get sufficient cooling, do you have a fan?

// Ola

Re: Parallella freezes

PostPosted: Mon Jun 12, 2017 4:20 am
by gordon
olajep wrote:Since the screen goes blank instead of locking up that leads me to believe that the board does not freeze, but is shutdown to protect itself from overheating.
Does the board get sufficient cooling, do you have a fan?

// Ola


I have a heat sink attached and the room temperature is set to 26 degree celsius

Re: Parallella freezes

PostPosted: Tue Jun 20, 2017 4:33 pm
by olajep
gordon,

gordon wrote:I have a heat sink attached and the room temperature is set to 26 degree celsius

Try with a fan (just need a tiny bit of airflow) and report back if that doesn't solve the problem. It also helps to have the board standing up on the side.
The heatsink is usually enough when the board is sitting idle (with a headless image). But when you start putting load on the system it will eventually go above 70C. When that happens the parallella-thermald daemon will kick in and shut off the board to protect it from overheating.

You can monitor the temperature (Zynq Temp) with the 'sensors' command:
Code: Select all
parallella@parallella:~ $ sensors
iio_hwmon-isa-0000
Adapter: ISA adapter
VDD_DSP (Epiphany):  +0.98 V 
+1.8V:               +1.76 V 
+1.35V (DDR):        +1.35 V 
V_ADC:               -0.00 V 
Zynq Temp:           +41.8°C 


// Ola

Re: Parallella freezes

PostPosted: Wed Jun 21, 2017 4:38 am
by gordon
I am using a fan and have no problems as of now, thank you :)

Re: Parallella freezes

PostPosted: Wed Jun 21, 2017 6:10 pm
by olajep
gordon wrote:I am using a fan and have no problems as of now, thank you :)

Awesome!