Istvan,
I made this change in the dac_init function in dac_core.c to set the register to a value of 1 instead of 3, but this did not change the functionality of the dac_valid signal. I hardcoded dac_datarate_s to a value of 1 (in the axi_ad9361_tx.v file) and this DID result in a pulsed version of the dac_valid signal.
// rate counters and data sync signals always @(posedge dac_clk) begin if ((dac_data_sync == 1'b1) || (dac_rate_cnt == 8'd0)) begin dac_rate_cnt <= dac_datarate_s; end else begin dac_rate_cnt <= dac_rate_cnt - 1'b1; end end assign dac_datarate_s = 1; // dma interface always @(posedge dac_clk) begin dac_valid <= (dac_rate_cnt == 8'd0) ? 1'b1 : 1'b0; dac_valid_i0 <= dac_valid; dac_valid_q0 <= dac_valid; dac_valid_i1 <= dac_valid & ~dac_r1_mode; dac_valid_q1 <= dac_valid & ~dac_r1_mode; end
This lead me to believe that the register in the axi_ad9361 core is not being updated properly. I added some custom code to the dac_init function to check the value being loaded into the register as seen below. The console window output is also included.
int drate = 99; int *pdrate = &drate; printf("*pdrate after initialization = %d\n",*pdrate); // original code //dac_write(phy, DAC_REG_RATECNTRL, DAC_RATE(3)); // begin: custom code dac_read(phy, DAC_REG_RATECNTRL, (uint32_t *)pdrate); printf("DAC_REG_RATECNTRL Originally = %d\n",*pdrate); dac_write(phy, DAC_REG_RATECNTRL, DAC_RATE(1)); // (updated per Csoml on Analog Devices engineering zone support) dac_read(phy, DAC_REG_RATECNTRL, (uint32_t *)pdrate); printf("DAC_REG_RATECNTRL After Update = %d\n",(int)*pdrate); // end: custom code
Console output
*pdrate after initialization = 99
DAC_REG_RATECNTRL Originally = 0
DAC_REG_RATECNTRL After Update = 0
I also checked the memory location using the SDK and it is never being updated to 1. It remains at 00 after the dac_write() command. Since the dac_write() simply calls the Xil_Out32() function, what would cause this function to not work?
I am not sure if this is related, but I also notice that the digital tuning process fails as indicated by the console output "ad9361_dig_tune: Tuning RX FAILED!"
Regards,
Nick