SD card image with Debian 8.0, Red Pitaya web server and SDK

Just about everything about Red Pitaya
Post Reply
pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by pavel » Thu Jan 04, 2024 9:03 am

and then change line 49 in adc-recorder.c to *(uint32_t *)(cfg + 50) = size;
That is it. The address of 32-bit accesses must be aligned to 32 bits. 50 bytes is not a multiple of 32 bits.

Here is a link to ARM documentation on alignment behavior:

https://developer.arm.com/documentation ... or?lang=en

fbalakirev
Posts: 101
Joined: Thu Sep 03, 2015 6:56 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by fbalakirev » Thu Jan 04, 2024 8:57 pm

Thank you for you help Pavel.

By the way, where or how do the base addresses x4*** and x41*** for cfg and sts get assigned in the Vivado?

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by pavel » Thu Jan 04, 2024 9:50 pm

The address ranges of the M_AXI_GP0 and M_AXI_GP1 interfaces are shown in table 4-1 of the Zynq-7000 TRM. 0x40000000 is the base address of the M_AXI_GP0 interface. The AXI4 hub uses bits 24 to 27 of the address to select one of its ports. The complete table of addresses can be found at this link.
Last edited by pavel on Fri Jan 05, 2024 3:52 pm, edited 1 time in total.

fbalakirev
Posts: 101
Joined: Thu Sep 03, 2015 6:56 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by fbalakirev » Tue Jan 09, 2024 12:11 am

Hi Pavel,

P.S. Never mind the following - I had a legacy RAM shrink settings sneak into my build. I switched to your pre-compiled image It went through allocating OK so far, although it hangs up afterwards. I'll look into that next.


I tried increasing CMA memory to 256MB as follows in the adc_recorder example:
- edited the last line uEnv.txt on sdcard root to '... cma = 290M' (also tried 272M)
- changed const_1 in block design to 2097151
- changed ADDR_WIDTH in axis_ram_writer to 21
- changed requested size in ioctl(fd, CMA_ALLOC, &size) to 256 MB

ioctl returns an error ' Cannot allocate memory'

I also noticed that 'free' shows total 117612 memory, perhaps it is shrunk?

I wonder if I'm missing something again.

fbalakirev
Posts: 101
Joined: Thu Sep 03, 2015 6:56 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by fbalakirev » Wed Jan 10, 2024 12:02 am

Hi Pavel,

Apologies for keeping bothering you - I got adc_recorder example with the expanded memory working OK on Red Pitaya 125 with all your help.

For some reason adc_recorder does not seem to work on the Red Pitaya 122.88 board - it hangs the system around line 49 in the adc-recorder.c, even with the unmodified example. I tried both 122.88 and 125 PLL clock settings, both work on RP 125 and hang on RP 122.88

I tried 2 different 122.88 boards with the same result.

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by pavel » Wed Jan 10, 2024 10:42 am

I am glad that memory allocation now works for you. I did not know why it did not work before.

Regarding the new issue, are you building the bitstream files for the 122.88 boards with the correct part number (PART=xc7z020clg400-1)?

fbalakirev
Posts: 101
Joined: Thu Sep 03, 2015 6:56 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by fbalakirev » Wed Jan 10, 2024 6:01 pm

pavel wrote:
Wed Jan 10, 2024 10:42 am
I did not know why it did not work before.
The allocations of big buffer was failing because I built the OS with only 128M of RAM. I fixed that.
pavel wrote:
Wed Jan 10, 2024 10:42 am
Regarding the new issue, are you building the bitstream files for the 122.88 boards with the correct part number (PART=xc7z020clg400-1)?
Thanks! That stopped the example from hanging the system

fbalakirev
Posts: 101
Joined: Thu Sep 03, 2015 6:56 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by fbalakirev » Thu Feb 29, 2024 12:16 am

pavel wrote:
Wed Jan 10, 2024 10:42 am
Regarding the new issue, are you building the bitstream files for the 122.88 boards with the correct part number (PART=xc7z020clg400-1)?
Is it possible to determine Xlinx part and/or Red Pitaya model programmatically? We have a number of different Red Pitaya models deployed over the years and I wonder if we can avoid mismatching the builds.

Also, are there markings on the boards to help distinguish particular product lines? E.g. basic 125-14 vs low-noise 125-14? I cannot find any myself.

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by pavel » Thu Feb 29, 2024 4:38 pm

I normally use the following command to programmatically check the hardware revision:

Code: Select all

fw_printenv -n hw_rev

User avatar
redpitaya
Site Admin
Posts: 912
Joined: Wed Mar 26, 2014 7:04 pm

Re: SD card image with Debian 8.0, Red Pitaya web server and SDK

Post by redpitaya » Fri Mar 01, 2024 12:24 pm

I wrote the difference between standard STEMlab 125-14 and STEMlab 125-14 Low Noise in this thread.

The visual difference applies to all boards, while the difference from the program point of view applies to the official Red Pitaya OS.

Otherwise, the board model is stored in the EEPROM (in the hardware revision number), which you can read with the:

Code: Select all

fw_printenv -n hw_rev
as Pavel mentioned.

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 99 guests