Troubles in intializing Red Pitaya card

Just about everything about Red Pitaya
Post Reply
Saetta_LMA
Posts: 2
Joined: Tue Mar 29, 2016 2:05 pm

Troubles in intializing Red Pitaya card

Post by Saetta_LMA » Wed Aug 10, 2016 9:43 am

Hello,

We are testing a new Red Pitaya card.
We have installed version 0.96RC1

We have made first tests in C in using the API library, in
support of acquire_trigger_posedge.c function.

We have errors in runing this test :

Code: Select all

~/RedPitaya/Examples/C# export LD_LIBRARY_PATH=/opt/redpitaya/lib ; time ./acquire_trigger_posedge
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:110
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:110
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:110
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:110
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:110
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
Runtime error: acq_GetDecimationFactor(&decimation) returned "Value out of range." at acq_handler.c:91
Runtime error: acq_GetDecimation(&decimationVal) returned "Value out of range." at acq_handler.c:328
68069
........
But if we launch the scpi_server (or any other apps from the included package) before execution test, we have no errors :

Code: Select all

5
Init
milieu n:0
fin n:0
milieu n:1
fin n:1
milieu n:2
fin n:2
milieu n:3
fin n:3
milieu n:4
........
Once we reboot the card, the errors come back and we have to launch one of the apps again.
Why is that ?
On the test program we use Rp_Init() and Rp_Reset() to initialize the Red Pitaya.
Have we forget somethings to do ?

Thanks for your answer
Serge

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Troubles in intializing Red Pitaya card

Post by Nils Roos » Wed Aug 10, 2016 9:04 pm

Hi,

the reason for these messages is that the newest release starts with the logic analyzer bitstream loaded into the FPGA, and it is obviously not compatible with the api. If you execute

Code: Select all

cat /opt/redpitaya/fpga/fpga_0.94.bit >/dev/xdevcfg
before running your program, all should be fine.

If you think that that is something that the api should do automatically, I would totally agree with you :mrgreen:

Saetta_LMA
Posts: 2
Joined: Tue Mar 29, 2016 2:05 pm

Re: Troubles in intializing Red Pitaya card

Post by Saetta_LMA » Thu Aug 11, 2016 9:25 am

Hi,

I tried this solution and it works really well, no more errors when launching the program !

Thanks a lot for the fast and efficient answer !

hpm
Posts: 1
Joined: Thu Sep 22, 2016 3:57 pm

Re: Troubles in intializing Red Pitaya card

Post by hpm » Sun Sep 25, 2016 4:23 pm

thank you

larndoc
Posts: 3
Joined: Mon Jan 26, 2015 12:20 pm

Re: Troubles in intializing Red Pitaya card

Post by larndoc » Mon Oct 10, 2016 12:09 am

Hello,

Thanks a lot for this tip. I stumbled across this, whilst unsuccessfully trying to run the Example programs on the redpitaya. What would be a more "robust" way to ensure the right fpga binary is loaded before calling a program that needs it?

Thanks again.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Troubles in intializing Red Pitaya card

Post by Nils Roos » Tue Oct 11, 2016 1:31 am

The best solution would be to have the rp_Init() function of the RP api load the bitstream it requires to work. It's quite simple really, fopen() the bitstream file then open() the /dev/xdevcfg device and dump all data from one into the other. There is code for that already in the Red Pitaya Bazaar plugin of nginx.

vimaldobariya
Posts: 4
Joined: Wed Jul 20, 2016 2:37 pm
Location: Germany

Re: Troubles in intializing Red Pitaya card

Post by vimaldobariya » Mon Jan 09, 2017 12:40 pm

Thanks Nils,
It works without any error.

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: Dnay and 26 guests