AnsweredAssumed Answered

FMCOMMS1 : problem with I-data

Question asked by e.lib on Jan 21, 2014
Latest reply on Jul 25, 2014 by DragosB

Hi,

 

I'm working with the no-os software, on a ZC706. I replaced the "dds_setup" function by the "dac_dma_setup" in "main.c". I would like to transmit a square wave but I've got some difficulties to understand what happens with the I and Q datas. When I tried to change the value of the I-datas, like this :

 

const uint16_t sine_lut[32] = {

        0x8000, 0x98F8, 0xB0FB, 0xC71C, 0xDA82, 0xEA6D, 0xF641, 0xFD89,

        0xFFFF, 0xFD89, 0xF641, 0xEA6D, 0xDA82, 0xC71C, 0xB0FB, 0x98F8,

        0x8000, 0x6707, 0x4F04, 0x38E3, 0x257D, 0x1592, 0x09BE, 0x0276,

        0x0000, 0x0276, 0x09BE, 0x1592, 0x257D, 0x38E3, 0x4F04, 0x6707

};

tx_count = sizeof(sine_lut) / sizeof(uint16_t);

for(index = 0; index < (tx_count * 2); index += 2)

{

        index_i1 = index;

        index_q1 = index_i1 + ((tx_count * 2) / 4);

        if(index_q1 >= (tx_count * 2))

                index_q1 -= (tx_count * 2);

        i1_data = (0x0000);

        q1_data = ((sine_lut[index_q1 / 2]) & 0xFFFF);

        Xil_Out32((DDRDAC_BASEADDR + (2*index)), ((i1_data << 16) | q1_data));

        index_i2 = index_i1 + (tx_count / 2);

        index_q2 = index_q1 + (tx_count / 2);

        if(index_i2 >= (tx_count * 2))

                index_i2 -= (tx_count * 2);

        if(index_q2 >= (tx_count * 2))

                index_q2 -= (tx_count * 2);

        i2_data = (0x0000);

        q2_data = ((sine_lut[index_q2 / 2]) & 0xFFFF);

        xil_printf("  Data_q1: (%08x)\n\r", q1_data);

        xil_printf("  Data_q2: (%08x)\n\r", q2_data);

        Xil_Out32((DDRDAC_BASEADDR + (2*(index + 1))), ((i2_data << 16) | q2_data));

}

I still have the same sine waves in Chipscope. I'm not sure of that, but it looks like the I-datas are not transmitted. What am I doing wrong ?

 

Thanks,

 

Erwan

Outcomes