[OpenTRV-dev] Loop overrun puzzler

Damon Hart-Davis damon at opentrv.uk
Wed Feb 17 08:37:29 GMT 2016


Hi All,

One annoynance that I’d like to fix, and have been unable to track down so far, is the source of loop overruns where the 2s loop does not complete in time.

At the moment, on the head of the master branch in DamonHD/OpenTRV on GitHub that’s reported as an error with the line:

    DEBUG_SERIAL_PRINTLN_FLASHSTRING("!loop overrun”);

It’s a particular annoyance with the FHT8V-controlling boards because a resync is needed to be safe, which is a waste of radio bandwidth and energy and causes a “beep” at the end, which may be in the middle of the night!  And it offends my engineering soul because the overrun shouldn’t be happening at all, and I’m worried that it is a symptom of a deeper problem.

The real puzzler is that the overrun can seem to happen even when the system is apparently quiet, not doing any of the things that might obviously cause a problem, such as printing a long status string to Serial or running the CLI.

I’d be very grateful for any suggestions to track this one down.

BTW, Deniz and I yesterday discovered an interesting problem with some bad boards where the slow clock 32768Hz watch ‘crystal’ circuit fails to fire up properly, and we can now detect in POST marginal devices based on the ratio between the CPU and slow clock frequencies and panic()!

Rgds

Damon






More information about the OpenTRV-dev mailing list