Page 1 of 1

LCD freeze problem

Posted: Fri Mar 07, 2014 6:23 pm
by Kot_dnz
Hello,

Need help from our community!
Today, i hope in nearest time, russian commit my last update for LCD and in this case our display will be look like
Image

After hard power reset we always initialize our RTC start from 2014-02-08 21:20:33.
Time is counting Ok till 21:21:18 (some times till seconds 19-21) and display is freezed! (approx 45 sec)
Of cause we can search mistake everywhere but....
Try to start putty or any other terminal program and our display unfreeze and working fine as long as i check without any anomaly.

Can anybody can specify where can i start to found solution?

Re: LCD freeze problem

Posted: Fri Mar 07, 2014 7:05 pm
by AndreyB
Kot_dnz wrote:Try to start putty or any other terminal program and our display unfreeze
This is probably the key. I now suspect the LCD driver is totally fine - it's just that the update code is never executed because the console loop is blocked somewhere.

Let's move LCD update into a separate thread so that it does not depend on the console in any way, I wonder if that's the issue. Another option would be to figure out why is the console output blocked.

Re: LCD freeze problem

Posted: Fri Mar 07, 2014 7:44 pm
by Kot_dnz
First step - i comment
// updateDevConsoleState();
and lcd Continue to work perfect. :)
For make experiment clear i comment other one function
// updateTunerStudioState();
and uncomment updateDevConsoleState();
lcd come back to freeze.

On fact - it's a
updateDevConsoleState();

Remember our experiments with MMC i can say - system with & without real hardware can have different mistake.
My system doesn't have anything.

Possible problems in

checkIfShouldHalt();
printPending();
pokeAdcInputs();
getCrankEventCounter();
getRpm();
finishStatusLine();

i check one by one by comment, but not received one way solution
int rpm = getRpm();
/* ... till end of function
and have really overflow.
Need debugger. :)

Re: LCD freeze problem

Posted: Mon Mar 10, 2014 3:01 am
by AndreyB
It's something related to console activity - maybe a buffer is overflowing and the console methods decide to sleep till there is a console connection, or something like that.

This should not look like a hack - I've realized that LCD, console and Tuner Studio should be in different threads anyway - so, the LCD problem is not resolved because LCD is now independed from the console logic and any console freezes.