Page 6 of 7
Re: Getting stuck with tickless mode
Posted: Wed Apr 08, 2015 7:18 pm
by Giovanni
That "vt_lasttime" at 65000 confirms my suspect, thanks for all the data.
Giovanni
Re: Getting stuck with tickless mode
Posted: Wed Apr 08, 2015 8:31 pm
by steved
Up to 60 hours continuous operation on a 32F051 now - looking very promising. However, if I've done the sums right a 32-bit counter at 10KHz rolls over after about 120 hours, so I'll leave it running for now, especially in view of rbarreiros' experience.
Re: Getting stuck with tickless mode
Posted: Thu Apr 09, 2015 11:02 am
by Giovanni
Fixed the problem as bug #573.
It was a missing cast, integer promotion rules kicked in and a comparison failed. There was also another problem that could have affected 32 bits counters too.
Giovanni
Re: Getting stuck with tickless mode
Posted: Thu Apr 09, 2015 8:06 pm
by steved
Giovanni wrote:Fixed the problem as bug #573.
It was a missing cast, integer promotion rules kicked in and a comparison failed. There was also another problem that could have affected 32 bits counters too.
Giovanni
I've downloaded the changes and got them on test - running for an hour now, and the code seems to run much 'better'. I am continuously polling a serial port, and on the last effort it was showing a lot of symptoms of things taking too long in the ST code; mostly erratic return of data. Now its much more stable, with just an occasional error (which is mostly down to the test setup, not helped by my dodgy vintage Delphi code and the things that Windows occasionally decides are more important than running my software)
Re: Getting stuck with tickless mode
Posted: Thu Apr 09, 2015 8:35 pm
by Giovanni
Delphi? I still do things with Delphi 7 and I still think it is the best. I still use it for my programming needs on desktop. Actually it inspired the modularity I strive for in ChibiOS.
The symptoms you mentioned could have been caused by the issue I resolved. The problem with the tickless mode is that I have still to find a way to test it exhaustively, unlike everything else in the kernel. I think the only solution is a long duration stress test along the lines of "IRQ-STORM".
Giovanni
Re: Getting stuck with tickless mode
Posted: Thu Apr 09, 2015 10:00 pm
by steved
Giovanni wrote:Delphi? I still do things with Delphi 7 and I still think it is the best. I still use it for my programming needs on desktop.
Pascal was the first high level language I used on embedded systems - took a little educating of the compiler authors about the difference between RAM and ROM! Nice to see you stopped at Delphi 7 as well

I've not yet found anything better, but its getting a bit long in the tooth.
Giovanni wrote:The symptoms you mentioned could have been caused by the issue I resolved. The problem with the tickless mode is that I have still to find a way to test it exhaustively, unlike everything else in the kernel. I think the only solution is a long duration stress test along the lines of "IRQ-STORM".
Once it all looks solid for a week or so I'll have it running on three processors 24/7, which is a start; certainly my code uses the virtual timers extensively, with enough interrupts and task switching to add a touch of randomness.
Re: Getting stuck with tickless mode
Posted: Mon Apr 13, 2015 1:15 pm
by Giovanni
Bad and good news....
The bad one is that I fixed another significant bug in the tickless mode (#577), this could cause intervals shorter than normal, this could be the cause of the strange events you observed steved.
The good one is that, finally, I can now test it properly, the test application revealed the problem and it has been running the stress test for hours now.
I will make another release later just for this one.
Giovanni
Re: Getting stuck with tickless mode
Posted: Tue Apr 14, 2015 10:27 pm
by steved
Giovanni wrote:Bad and good news....
Giovanni
As you say - my setup had been running for 5 days continuously without a lockup.
Have implemented the latest changes; had a couple of hours running, and subjectively it appears a little 'better'. Will try and give it a week before stopping it.
Re: Getting stuck with tickless mode
Posted: Thu Apr 30, 2015 8:30 pm
by steved
Have now had my test 32F051 board running continuously for fractionally under 7 days without it faltering, so I think we can say this is sorted!
About to put the same code into two more boards for 'permanent' test.
Re: Getting stuck with tickless mode
Posted: Thu Apr 30, 2015 8:33 pm
by Giovanni
Thanks for confirming

This was one of the few remaining open points.
Giovanni