Square wave output using fmcdaq2

Dear EngineerZone community


Please support.

I am currently creating a communication system.
The concept is to generate an information signal with vc707 and output it as a Square wave from the DAC (ad 9144) of fmcdaq2. Then, the output Square wave is input to the modulator and communication is carried out.

Before that, I am trying to output a Square wave of 1 kHz (offset 0V) from DAC (AD9144) of fmcdaq2.
How can I do it?

Can you create a design as per the user guide and store a Square wave in the buffer?

I can use both Linux / no-OS.

Yuta

  • Hi, Andrei

    After commenting out #define DMA_BUFFER 0 of L70 in fmcdaq2.c, I changed #if DMA_BUFFER in L640 to #define DMA_BUFFER and commented out from #else in L618 to #endif in L624.

    After that, I ran make with no-OS/fmcdaq2/vc 707, and as a result of running with SDK, it was displayed on the console as follows.

    How can I solve it? please teach me.

    ----------------------------------------------------

    Available sampling rates:
    1 - ADC 1000 MSPS; DAC 1000 MSPS
    2 - ADC 500 MSPS; DAC 1000 MSPS
    3 - ADC 500 MSPS; DAC 500 MSPS
    4 - ADC 600 MSPS; DAC 600 MSPS
    choose an option [default 1]:
    4
    4 - ADC 600 MSPS; DAC 600 MSPS

    CPLL ENABLE
    xcvr_setup ERROR: XCVR initialization failed!

    CPLL ENABLE
    xcvr_setup ERROR: XCVR initialization failed!
    Tx link is disabled
    Measured Link Clock: off
    External reset is deasserted
    Rx link is disabled
    Measured Link Clock: off
    External reset is deasserted
    adc_setup adc core Status errors.
    dac_setup DAC Core Status errors.

    ----------------------------------------------------

  • 0
    •  Analog Employees 
    on Oct 24, 2018 11:08 AM over 2 years ago in reply to matsu.yu.11

    That is a strange result.
    Correction, don't uncomment anything out, just change 0 to 1
    https://github.com/analogdevicesinc/no-OS/blob/master/fmcdaq2/fmcdaq2.c#L70

    Andrei

  • I just changed 0 to 1 of https://github.com/analogdevicesinc/no-OS/blob/master/fmcdaq2/fmcdaq2.c#L70.

    After that, I ran make with no-OS/fmcdaq2/vc 707, and as a result of running with SDK, it was displayed on the console as follows. The same error occurred

    How can I solve it? please teach me.

    ----------------------------------------------------

    Available sampling rates:
    1 - ADC 1000 MSPS; DAC 1000 MSPS
    2 - ADC 500 MSPS; DAC 1000 MSPS
    3 - ADC 500 MSPS; DAC 500 MSPS
    4 - ADC 600 MSPS; DAC 600 MSPS
    choose an option [default 1]:
    1
    1 - ADC 1000 MSPS; DAC 1000 MSPS
    xcvr_setup ERROR: XCVR initialization failed!
    xcvr_setup ERROR: XCVR initialization failed!
    Tx link is disabled
    Measured Link Clock: off
    External reset is deasserted
    Rx link is disabled
    Measured Link Clock: off
    External reset is deasserted
    adc_setup adc core Status errors.
    dac_setup DAC Core Status errors.

    ----------------------------------------------------

    Also, CDT Build Console is as shown below.Are these errors caused?

    ----------------------------------------------------


    18:15:33 **** Incremental Build of configuration Debug for project sw ****
    make all
    'Building file: ../src/ad9144.c'
    'Invoking: MicroBlaze gcc compiler'
    mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/ad9144.o" -I../../bsp/sys_mb/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-div -mcpu=v10.0 -mno-xl-soft-mul -mxl-multiply-high -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/ad9144.d" -MT"src/ad9144.o" -o "src/ad9144.o" "../src/ad9144.c"
    In file included from ../src/platform_drivers.h:47:0,
    from ../src/ad9144.c:46:
    ../src/config.h:70:9: error: expected declaration specifiers or '...' before string constant
    printf("\nWARNING no vendor defined in config.h (for carrier)\n");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/config.h:74:9: error: expected declaration specifiers or '...' before string constant
    printf("\nWARNING CPU arch defined in config.h\n");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from ../src/ad9144.c:46:0:
    ../src/ad9144.c: In function 'ad9144_spi_check_status':
    ../src/platform_drivers.h:111:23: warning: implicit declaration of function 'usleep' [-Wimplicit-function-declaration]
    #define mdelay(msecs) usleep(1000*msecs)
    ^
    ../src/ad9144.c:134:4: note: in expansion of macro 'mdelay'
    mdelay(1);
    ^~~~~~
    ../src/ad9144.c: In function 'ad9144_short_pattern_test':
    ../src/ad9144.c:528:50: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t {aka long unsigned int}' [-Wformat=]
    printf("%s : short-pattern-test mismatch (0x%x, 0x%x 0x%x, 0x%x)!.\n",
    ^
    ../src/ad9144.c:528:56: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t {aka long unsigned int}' [-Wformat=]
    printf("%s : short-pattern-test mismatch (0x%x, 0x%x 0x%x, 0x%x)!.\n",
    ^
    ../src/ad9144.c:528:61: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t {aka const long unsigned int}' [-Wformat=]
    printf("%s : short-pattern-test mismatch (0x%x, 0x%x 0x%x, 0x%x)!.\n",
    ^
    make: *** [src/ad9144.o] error 1

    18:15:38 Build Finished (took 4s.496ms)

     ----------------------------------------------------

  • 0
    •  Analog Employees 
    on Oct 25, 2018 10:11 AM over 2 years ago in reply to matsu.yu.11

    Hi,

    What other changes have you made to the code?

    I see:
    ../src/config.h:70:9: error: expected declaration specifiers or '...' before string constant
    printf("\nWARNING no vendor defined in config.h (for carrier)\n");
    https://github.com/analogdevicesinc/no-OS/blob/master/fmcdaq2/config.h#L69

    The in the make flow the XILINX, ZYNQ... are predefined https://github.com/analogdevicesinc/no-OS/blob/master/scripts/zynq.mk#L39

    There is something wrong with your build.

    See: https://wiki.analog.com/resources/fpga/quick_validation

    Andrei

  • 0
    •  Analog Employees 
    on Oct 25, 2018 10:15 AM over 2 years ago in reply to andrei_g

    Try not to use DEBUG, there will be conflicts with some xilinx files.

    Andrei