diff --git a/BF_companion b/BF_companion index 564a3df..b49a9b2 100755 Binary files a/BF_companion and b/BF_companion differ diff --git a/main.c b/main.c index 473926d..787132d 100644 --- a/main.c +++ b/main.c @@ -854,6 +854,11 @@ uint32_t X502_FlushRcv_buff(t_x502_hnd hnd){ void receive_to_file(t_x502_hnd hnd, char* logfilename, uint32_t* inp_buff, uint32_t max_total_words){ FILE* logfile_ptr = fopen(logfilename, "a"); + +// fprintf(logfile_ptr, "0xFF00000 \n"); +// fprintf(logfile_ptr, "0xFFFFFFF \n"); +// fprintf(logfile_ptr, "0xFF00000 \n"); + uint32_t recv_Err_code = X502_Recv(hnd, inp_buff, max_total_words, 10000); if (recv_Err_code > 0){ uint32_t received_words = recv_Err_code; @@ -1268,24 +1273,29 @@ int main(int argc, char** argv) { - printf("\nStart SEMITRANSPARENT mode\n"); - BF_exec_cmd_simple(hnd, 0x800B, 2, 1); //start SEMITRANSPARENT +// printf("\nStart SEMITRANSPARENT mode\n"); +// BF_exec_cmd_simple(hnd, 0x800B, 2, 1); //start SEMITRANSPARENT -// printf("\nStart AVG mode\n"); -// BF_exec_cmd_simple(hnd, 0x8008, 2, 1); //start averaging + printf("\nStart AVG mode\n"); + BF_exec_cmd_simple(hnd, 0x8008, 2, 1); //start averaging // printf("\nflush TX buff. \n Number of free TX descriptors before flushing:"); // BF_exec_cmd_simple(hnd, 0x8010, 10, 1); -// X502_StreamsStop(hnd); -// X502_StreamsStart(hnd); + X502_StreamsStop(hnd); + X502_StreamsStart(hnd); //BF_exec_cmd_simple(hnd, 0x8008, 2, 1); //start averaging //BF_exec_cmd_simple(hnd, 0x8007, 2, 1); //start transparent + +// printf("waiting a bit...\n"); +// for(uint32_t wait_i = 1e4; wait_i; --wait_i){printf("");} +// for(uint32_t wait_i = 1e6; wait_i; --wait_i){;} + printf("\nFlushed from receiving buff: %d\n", X502_FlushRcv_buff(hnd)); @@ -1357,6 +1367,8 @@ int main(int argc, char** argv) { printf("\nStart transparent mode\n"); BF_exec_cmd_simple(hnd, 0x8007, 2, 1); //start transparent + X502_StreamsStop(hnd); + X502_StreamsStart(hnd); printf("\nflush TX buff. \n Number of free TX descriptors before flushing:"); BF_exec_cmd_simple(hnd, 0x8010, 10, 1);