AnsweredAssumed Answered

about receive data

Question asked by hly0407 on Dec 28, 2015
Latest reply on Jan 9, 2016 by hly0407

hello everyone   

i use ad9361 with no-os system at fmcomms2+zc706. and i select TDD mode,and set rx2tx2 as 0.

 

i connect signal source at rx1. and the signal source provide sine signal. than in the code, i do this.

 


uint32_t ensm_state ;
int32_t i;
int32_t rdata;
int16_t sampI, sampQ;
uint8_t en_dis = 5;

 

 

en_dis_rx(ad9361_phy,1,RX_ENABLE);
en_dis_rx(ad9361_phy,2,RX_DISABLE);

 

 

//ensm
ad9361_set_en_state_machine_mode(ad9361_phy,ENSM_STATE_ALERT);
ensm_state = get_cur_ensm_status(ad9361_phy);
ad9361_set_en_state_machine_mode(ad9361_phy,ENSM_STATE_RX);
ensm_state = get_cur_ensm_status(ad9361_phy);

 

 

//Rx
adc_capture(16384,ADC_DDR_BASEADDR);
Xil_DCacheInvalidateRange(ADC_DDR_BASEADDR,16384*4);

 

 

mdelay(1000);
for( i= 0; i< 16384; i++ )
{
     rdata = Xil_In32(ADC_DDR_BASEADDR+(i*4));
     sampQ = rdata & 0xFFFF;
     sampI = (rdata>>16) & 0xFFFF;

  xil_printf("%d ",sampI);
}

 

than i use some method to save sampI to file. last i use matlab to draw the data, but it's not sine curve.

 

I sure the i enable rx1,and disable rx2. so the receive data is I1 Q1 I1 Q1 I1 Q1....

 

there are the main.c and the data i draw

 

what's wrong with me? can somebody help me.

 

hly

Attachments

Outcomes