redpitayadigital-analog-converter

Redpitaya X-Channel Streaming: How to control the DAC to output a signal?


The Redpitaya X-Channel streaming application states that streaming can be done in both directions (acquisition and generation).

But unfortunately there is no example addressing the DAC procedure. Furthermore I coudn't find any thrid-party documentation that provides a minimal working example. (If I missed something, please let me know.)

The only information about the DAC streaming mode I could find, can be accessed via rpsa_client -h which explains the command structure of the DAC streaming mode. (how to get the rpsa_client executable is explained here)

I tried the procedure explained below which resulted in a connection timeout without any further information what is going wrong.

If you have any deeper knowledge or experience with the streaming application or if you find any mistake in the steps below, please let me know!

Steps to reproduce:

Setup the STEMlab 125-14 board, connected with network and verifed by accessing webpage.

Connected Output 1 to an oscilloscope to verify if a signal is generated.

  1. Started the DAC mode with:

./rpsa_client -r -h <ip> -m start_dac -v

  1. Set the configuration with:

./rpsa_client -c -h <ip> -s F -f <path>/stream.conf -v

(content of stream.conf below)

  1. Started streaming mode with:

./rpsa_client -o -h <ip> -f wav -d <path>/test_sine.wav -r 1 -m 1M -v

(the test_sine.wav contains a simple 200 kHz tone for testing with approx. 625_000 samples)

Console Outputs:

<timestamp>:  Connected: <ip>
<timestamp>:  Send start DAC command to master board: <ip>
<timestamp>:  DAC streaming started: <ip> Local mode [OK]

^ What's the reason for Local mode here? In ADC mode, it says TCP mode.

2.

<timestamp>:  Connected: <ip>
<timestamp>:  Send configuration to: <ip>
<timestamp>:  SET: <ip> [OK]
<timestamp>:  Send configuration save command to: <ip>
<timestamp>:  SAVE TO FILE: <ip> [OK]

^ seem legit.

3.

<timestamp>:  Connect timeout: <ip>

^ timeout without any further information

Stream.conf content:

Comments explaining each parameter where added (? = don't know)

{
    "adc_streaming" :
    {
        "attenuator" : 1,       // 1: 1:1, 2: 1:20 (input attenuation)
        "calibration" : true,   // use calibration
        "channels" : 1,         // 1: channel 1, 2: channel 2, 3: both channels
        "coupling" : 2,         // ?
        "decimation" : 2,       // sample rate decimation
        "format" : 0,           // ?
        "port" : "8900",        // TCP/UDP Port
        "protocol" : 0,         // 0: TCP, 1: UDP
        "resolution" : 1,       // 1: 8 bit, 2: 16 bit
        "samples" : 2000000,    // NOS: Only relevant if save_type is '1'
        "save_type" : 0,        // 0: Ethernet, 1: Save to SD card
        "type" : 1
    },
    "dac_streaming" :
    {
        "dac_file" : "",                // file path - specified in `rpsa_client -o` command
        "dac_file_type" : 1,            // ?
        "dac_gain" : 0,                 // ?
        "dac_memoryUsage" : 1048576,    // size of RAM cache
        "dac_mode" : 1,                 // ?
        "dac_port" : "8903",            // TCP/UDP Port
        "dac_repeat" : 1,               // Repetition mode (enable/disable)
        "dac_repeatCount" : 10,         // number of repetitions
        "dac_speed" : 62500000          // sample rate
    },
    "loopback" :            // ?
    {
        "channels" : 1,     // ?        
        "dac_speed" : -1,   // ?
        "mode" : 0,         // ?
        "timeout" : 1       // timeout in seconds?
    }
}


Solution

  • Direct correspondence with Redpitaya revealed that the DAC streaming mode is not available at this time, explaining the missing description. The misleading documentation will either be adjusted or DAC streaming released.