Index: App/Services/FPGA.c =================================================================== diff -u -r81ca79980a75ab71985d3d610bcef45fd6730458 -r6c8c486d26306662402945537c5acaea2709d85b --- App/Services/FPGA.c (.../FPGA.c) (revision 81ca79980a75ab71985d3d610bcef45fd6730458) +++ App/Services/FPGA.c (.../FPGA.c) (revision 6c8c486d26306662402945537c5acaea2709d85b) @@ -315,11 +315,12 @@ fpgaReadCommandInProgress = FALSE; fpgaReadCommandACKed = ( fpgaReadResponseBuffer[0] == FPGA_READ_CMD_ACK ? TRUE : FALSE ); } - // first receipt? - if ( 1 == fpgaReceiptCounter ) + + // see if we want to follow up with a bulk read command + if ( TRUE == fpgaBulkWriteAndReadInProgress ) { - // see if we want to follow up with a bulk read command - if ( TRUE == fpgaBulkWriteAndReadInProgress ) + // first receipt? + if ( 1 == fpgaReceiptCounter ) { fpgaBulkWriteAndReadInProgress = FALSE; fpgaReadCommandInProgress = TRUE; @@ -457,6 +458,7 @@ fpgaReadCmdBuffer[4] = GET_LSB_OF_WORD( crc ); fpgaReadCmdBuffer[5] = GET_MSB_OF_WORD( crc ); // prep DMA for sending the read cmd and receiving the response + fpgaReadCommandInProgress = TRUE; setupDMAForReadResp( FPGA_READ_RSP_HDR_LEN + sizeof(FPGA_HEADER_T) + FPGA_CRC_LEN ); setupDMAForReadCmd( FPGA_READ_CMD_HDR_LEN + FPGA_CRC_LEN ); startDMAReceiptOfReadResp(); @@ -480,7 +482,7 @@ FPGA_STATE_T result = FPGA_STATE_READ_HEADER; // did we get an FPGA response? - if ( ( TRUE == fpgaWriteCommandACKed ) && ( TRUE == fpgaReadCommandACKed ) ) + if ( TRUE == fpgaReadCommandACKed ) { // did FPGA Ack the read command? if ( fpgaReadResponseBuffer[0] == FPGA_READ_CMD_ACK ) @@ -493,7 +495,11 @@ } } } + else // + { + } + return result; }