LCD freeze problem

It's all about the code!
Post Reply
Kot_dnz
contributor
contributor
Posts: 29
Joined: Mon Dec 16, 2013 6:12 pm

LCD freeze problem

Post 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?
User avatar
AndreyB
Site Admin
Posts: 11287
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: LCD freeze problem

Post 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.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
Kot_dnz
contributor
contributor
Posts: 29
Joined: Mon Dec 16, 2013 6:12 pm

Re: LCD freeze problem

Post 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. :)
User avatar
AndreyB
Site Admin
Posts: 11287
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: LCD freeze problem

Post 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.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
Post Reply