Detailed Review of Test v152 = v151 but no USER ISRs, see above
Note: please note time stamps, like Zt[x] or Zeit[x] are always recorded inside the Loop, i.e. before and after a given and then mentioned subroutine is called, hence the Freeze might have taken place directly before a subroutine was branched to or immediately after leaving it. Maybe, the Freeze might be related to the stack, which control such branching, but then this must be a well tested feature and might not be able to explain the constant time of these Freezes. However, I have also recorded times inside subs, recording Freezes, i.e. whilst subroutines did run.
From those details following, particularly after Freeze 8, makes me think, that Freezes can occur everywhere and that we see a more often Freezes at certain locations, might simply be a coincidence, caused by the longer execution time of such subroutine.
Below shows also (again) that there can be very little or many hours between Freezes, so these Freezes might have been easily overseen in the past.
TestStart: 12:47
19:17 Freeze 1: an interesting location, as inside the routine Int433() which is no longer executed when an external Interrupt, triggered by a connected Arduino Micro Pro occurs. It is in v152 polled inside Loop(), checking Serial2 (115200baud). It includes while(Serial2.available()), but there was nothing available or if less than 60 bytes, at which time an error had otherwise occurred and printed out.
20:44 Freeze 2: identical to 1
22:43 Freeze 3: identical to 1
11 Loop()s later, Freeze 4, between Zeit[3] & Zeit[4], a new position! Here is merely a KNX value checked to see if a given motion sensor should be served. If this would be the case, a KNX command would be executed together with an Serial.print message, indicating this. As no Serial.print was recorded, the whole sub was merely
Code:
if(Parameter[45]==0) { “this part was not executed, as it includes the Serial.print”}
17 Loop()s later, Freeze 5, between Zt[1] & Zeit[1] – here Loop() checks if a minute or hour has passed, using <TimeLib.h>. This type of Freeze has been seen before
00:28 Freeze 6, between Z[33] & Z[34], here the subroutine checks two switches and includes the digitalReadFast (which should rather be the analogRead) – a common position
02:40 Freeze 7, identical to 1, as it seems a preferred location – a location which checks Serial2
04:11 Freeze 8, a new and very interesting one. It happens between StartTimeLoop and Zt[0], see here:
Code:
void loop()
{
StartTimeLoop=millis();
digitalWrite(LoopIndicator,HIGH);
LoopCounter++;
AnzahlInt433LastLoop=0;
Zt[0]=millis();
05:28 Freeze 9: as Freeze 1
12:11 Freeze 10, firstly, identical to Freeze 5.
Test Stop 13:09
I prepare now a further version which will write to Serial5, read by an Arduino Due, instead of using USBSerial
Thanks for everybody's patience!