In iec61375-2-3.h , certain default timeout values, are defined incorrectly as compared to their units in which they are expected.
For example, #define TTDB_OP_DIR_INFO_REQ_TO 3000u is expected to be 3 seconds, and is defined in mili seconds here; but TTDB_OP_DIR_INFO_REQ_TO is directly used as it is where the timeout value is expected in micro seconds.
Proposal to change all such values as per the attached diff, either in this file,
OR
consider the multiplying factor in every instance they are used.
OK, care has to be taken as the values might be used elsewhere and will be incompatible - the names will be changed to reflect this and to not provoke hard-to-find timing errors...
Please check the value of
ETB_CTRL_TO_US. It should be 3s (3000000u) but it actually evaluates to 0.3s (300000u).I think a zero is missing.