Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rf58fb877a3b2a7ed117deb950a5598835e7549bb -r5245b978c9960cd064751f86c90c0b35207e1810 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision f58fb877a3b2a7ed117deb950a5598835e7549bb) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 5245b978c9960cd064751f86c90c0b35207e1810) @@ -50,7 +50,7 @@ #define MAX_COMM_CRC_FAILURE_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< CRC error window #define MSG_NOT_ACKED_TIMEOUT_MS 250 ///< maximum time for a Denali message that requires ACK to be ACK'd -#define MSG_NOT_ACKED_MAX_RETRIES 8 ///< maximum number of times a message that requires ACK that was not ACK'd can be re-sent before alarm +#define MSG_NOT_ACKED_MAX_RETRIES 10 ///< maximum number of times a message that requires ACK that was not ACK'd can be re-sent before alarm #define PENDING_ACK_LIST_SIZE 25 ///< maximum number of Delanli messages that can be pending ACK at any given time #define MAX_FPGA_CLOCK_SPEED_ERRORS 3 ///< maximum number of FPGA clock speed errors within window period before alarm @@ -774,13 +774,16 @@ { for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) { // pending ACK expired? - if ( ( TRUE == pendingAckList[ i ].used ) && ( TRUE == didTimeout( pendingAckList[ i ].timeStamp, MSG_NOT_ACKED_TIMEOUT_MS ) ) ) + if (( TRUE == pendingAckList[ i ].used ) && ( TRUE == didTimeout( pendingAckList[ i ].timeStamp, MSG_NOT_ACKED_TIMEOUT_MS ) )) { // if retries left, reset and resend pending message. Do not retry when in POST since the UI might not still be responsive - if ( ( pendingAckList[ i ].retries > 0 ) && ( getCurrentOperationMode() != DG_MODE_INIT ) ) - { // re-queue message for transmit - pendingAckList[ i ].retries--; - pendingAckList[ i ].timeStamp = getMSTimerCount(); - addToCommBuffer( pendingAckList[ i ].channel, pendingAckList[ i ].msg, pendingAckList[ i ].msgSize ); + if ( pendingAckList[ i ].retries > 0 ) + { + if ( getCurrentOperationMode() != DG_MODE_INIT ) + { // re-queue message for transmit + pendingAckList[ i ].retries--; + pendingAckList[ i ].timeStamp = getMSTimerCount(); + addToCommBuffer( pendingAckList[ i ].channel, pendingAckList[ i ].msg, pendingAckList[ i ].msgSize ); + } } // if no retries left, alarm else @@ -794,6 +797,16 @@ } } } + else + { + for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) + { + if ( TRUE == pendingAckList[ i ].used ) + { // reset timeout for transmit, don't urn up retries when the HD/UI not paying attention. + pendingAckList[ i ].timeStamp = getMSTimerCount(); + } + } + } } /*********************************************************************//**