Hi,

I tried to use sigrok-cli to sample an 8MHz SWO signal in Ubuntu and
Raspbian. But, I met a problem.

*sigrok-cli -d fx2lafw -c samplerate=24MHz -C 0=SWO,1=LED0,2=LED2 -O vcd -o
d.vcd  --time 1s*
*Device only sent 12966912 samples.*

*12966912 samples equal to about 550ms.*
The lower frequency signals are no problem.
Then, I wrote the code by using *libusb-1.0* and referring to *libsigrok*
to solve the problem *with submission before send_samplerate.*

*    buf_fill_len = 240128;*
*    int count = 100;*
    while(count--)
    {

        img_transfer = libusb_alloc_transfer(0);
        libusb_fill_bulk_transfer(img_transfer, dev_handle, 2
|LIBUSB_ENDPOINT_IN, data_inbuf.buf_fill,  buf_fill_len, fn_recv, NULL, 0);
        ret = libusb_submit_transfer(img_transfer);
        if(ret != 0 )
        {
            printf("sub ret = %d\n,count = %d\n", ret, count);
        }
    }

However, I just got 69 times successful submission, 31 times submission
with return *LIBUSB_ERROR_IO*, and 12006400 samples, equal to about 500ms.
I noticed *submission before send_samplerate (only 30 times) *and *submission
in LIBUSB_CALL *are combined in libsigrok.

But, for my part, what should I do to get a sample of more than 50 seconds.

Finally,

Thank you for the inspiration to design HATBED. On this day we honor all
sigrok contributors sincerely.

Thanks,

Yi
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to