Changed Tturnaround time in MS/TP modules to be a minimum of 2ms, or use a dummy transmit of 4 bytes while the transceiver is disabled. 1ms delay will always give smaller than 1ms of delay due to silence timer tick.

This commit is contained in:
skarg
2010-10-18 20:42:26 +00:00
parent a5f24fa19f
commit 57781b40cb
8 changed files with 72 additions and 55 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ void RS485_Turnaround_Delay(
/* delay after reception before trasmitting - per MS/TP spec */
/* wait a minimum 40 bit times since reception */
/* at least 1 ms for errors: rounding, clock tick */
turnaround_time = 1 + ((Tturnaround * 1000UL) / RS485_Baud);
turnaround_time = 2 + ((Tturnaround * 1000UL) / RS485_Baud);
while (Timer_Silence() < turnaround_time) {
/* do nothing - wait for timer to increment */
};
@@ -241,7 +241,7 @@ bool RS485_ReceiveError(
}
/****************************************************************************
* DESCRIPTION: Return true if data is available
* DESCRIPTION: Return true if data is available
* RETURN: true if data is available, with the data in the parameter set
* ALGORITHM: none
* NOTES: none