125-14, OS 0.98-617: generating custom waveform problem

Applications, development tools, FPGA, C, WEB
Post Reply
pazzodalegare
Posts: 2
Joined: Tue Oct 13, 2020 4:05 pm

125-14, OS 0.98-617: generating custom waveform problem

Post by pazzodalegare » Tue Oct 13, 2020 6:20 pm

Hi,

I'm trying to generate a custom signal but I'm viewing something wrong so I wrote a test derived from generate* C examples.

You can find the test code is below but you can see from my osc that the signal has problems on (frame) transition.

Do you have any clue?

Tnx
pz

https://filebin.net/18770juehipgrns2/Sq ... t=hwo3bfb0
https://filebin.net/18770juehipgrns2/Sq ... t=hwo3bfb0

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include "redpitaya/rp.h"

int main(int argc, char **argv){

        int i;
        int buff_size = 16384;
        int sig_size = 1488;

        /* Print error, if rp_Init() function failed */
        if(rp_Init() != RP_OK){
                fprintf(stderr, "Rp api init failed!\n");
        }

        float *x = (float *)malloc(buff_size * sizeof(float));

        for (i = 0; i < sig_size/2; ++i){
                x[i] = 1.0;
        }
        for (; i < sig_size; ++i){
                x[i] = -0.5;
        }

        rp_GenWaveform(RP_CH_1, RP_WAVEFORM_ARBITRARY);

        rp_GenArbWaveform(RP_CH_1, x, sig_size);

        rp_GenAmp(RP_CH_1, 1.0);

        rp_GenFreq(RP_CH_1, 4000.0);

        rp_GenOutEnable(RP_CH_1);

        /* Releasing resources */
        free(x);
        rp_Release();
}
Last edited by pazzodalegare on Wed Oct 14, 2020 12:18 am, edited 1 time in total.

pazzodalegare
Posts: 2
Joined: Tue Oct 13, 2020 4:05 pm

Re: 125-14, OS 0.98-617: generating custom waveform problem

Post by pazzodalegare » Tue Oct 13, 2020 6:29 pm

File added again

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 3 guests