       if (currt < tstbgn) duration = (MAX_UNSIGNED_LONG - tstbgn) + currt;
       else                duration = currt - tstbgn;
 
-      if (duration > TSTLEN) iststmode = false;
+      if (duration > TSTLEN)
+         {
+      //
+         iststmode = false;
+         doreset();
+         }
       }
       
    //... and little sleep

            {
         //
            iststmode = false;
            for (int i = 0; i < pinc; i++)
               {
            //
               EEPROM.write(eeprom[i], 0);
               pineepromstate[i] = 0;
               }
            }
         //else
         if (cmd & GETSTAT)

         if (cmd & TSTMODE)
            {
         //
            tstbgn = millis();
            iststmode = true;
            }
