AFE822x sampling rate problems

96 views
Skip to first unread message

Ingolf Larsson (SM6FHZ)

unread,
Feb 12, 2025, 1:15:47 PMFeb 12
to Linrad
Hi All.

I am a new user of Linrad and I am lost in the sampling rates of the AFE822x Dual channel.

First I had problems to install the 64 Bit version of Linrad on my 64 Bit Win7 PC. Using the installer "setup-linrad-05.02", it would only install the 32 Bit version whatever I tried with different directories and files placed in the directories. Finally I succeeded in installing the 64 Bit version by using the "linrad64" file in a separate directory.
The 32 Bit version seemed to do ok with sampling rates of 1 000 000 Hz (corrected it to 997402 or so). However after I installed the 64 bit version I get an error message in the spectrum screen area of Linrad "RX AD SPEED ERROR: 1009278Hz (nominal 997406Hz) DA SYNC ERRORS 2" in both the 32 Bit AND 64 Bit version of Linrad. The frequency on Medium Wave is also off by ~4 kHz. I have applied an "Clock adjust" of 5000 ppb (5 ppm = ~5 Hz at MW).
This frequency error is present also when connecting to the AFE822x using SDRConsole.
Power cycling of the AFE822x seems to reset the AFE822x to the correct operation.
Connecting to the AFE822x with either Linrad 32 Bit OR Linrad 64 Bit versions now get the AFE822x in the error state again.
I think I have screwed up some parameter somewhere that makes Linrad do something stupid to the AFE822x, but I can not find out what I have done.
The AFEDRI Control-box connects OK to the AFE822x, but does not repairs the problem.

Anyone have any hints?
I enclose the content of the "par_netafedri"-file (with the ip-adress garbled) if that can give any clue.

73 / Ingolf, SM6FHZ

par_netafedri:

IP1 [xxx]
IP2 [xxx]
IP3 [97]
IP4 [8]
Port [50112]
Sampling rate [997402]
Format [16]
UDP size [0]
Clock adjust [5000]
Channels [2]
VGA type [1]
Multistream [0]
Check [409352]

Change only between brackets.
If file has errors, Linrad will ignore file and use defaults
or prompt for a complete set of new parameters

Linrad-05.02

Ingolf Larsson (SM6FHZ)

unread,
Feb 15, 2025, 4:15:38 AMFeb 15
to Linrad
Dear All.

After a number of  Uninstallations and installations I have the Linrad32 and Linrad64 running at 250 kHz BW.
Then new questions arise.

What is the largest BW Linrad32 and / or Linrad64 can run at with the AFE822x in dual channel mode?

Clearly, running at the maximum that the AFE822x can handle in dual channel mode ( 1 MHz) is not possible.
I intend to use Linrad for Medium Wave DX'ing and would like to have the largest possible BW in order to be able
to scan the band without changing the mid frequency of the sampled band.

Another question; Is it possible to make an asymmetric IF-filter for AM?
In order to filter away adjacent AM-stations on one side of the wanted station.
I have not been able to find a way to do that?

73 / Ingolf, SM6FHZ

Francesco Cominelli

unread,
Feb 15, 2025, 4:47:24 AMFeb 15
to lin...@googlegroups.com
Ciao Ingolf. I use 96000.

73' Francesco IK2DDR 


Il Sab, 15 Feb, 2025 alle 10:15, Ingolf Larsson (SM6FHZ)
<ingol...@gmail.com> ha scritto:

--
There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
---
You received this message because you are subscribed to the Google Groups "Linrad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/linrad/07228f07-ece7-4785-b381-9a0bc3d5bc17n%40googlegroups.com
.

Leif Asbrink

unread,
Feb 16, 2025, 11:27:14 AMFeb 16
to lin...@googlegroups.com
Hej Ingolf!

I have an Afedri-SDR-Net two channel SDR. It is old, but I think it
is compatible with the latest ones. Look at this video:
https://www.youtube.com/watch?v=_30GIKI60Ug

I am running two channels at 1 MHz sampling.

I tried it now on an old computer, Intel core duo E7400 2.8GHz
with DDR2@398MHz. The CPU load is about 20%

On the setup screen it says:
Target name SDR-IP
Serial AN3931B2C
Max sampling 2MHz
ADC clock 80 MHz.

Parameters:
IP1 [10]
IP2 [0]
IP3 [0]
IP4 [92]
Port [50005]
Sampling rate [1000000]
Format [16]
UDP size [0]
Clock adjust [0]
Channels [2]
VGA type [1]
Multistream [0]
Check [409352]
With your ip-adress garbled I assume your Afedri is on the Internet.
You have a network problem. Is it specified for 32 megabit/s
continously?

73

Leif



> Dear All.
>
> After a number of Uninstallations and installations I have the Linrad32
> and Linrad64 running at 250 kHz BW.
> Then new questions arise.
>
> *What is the largest BW Linrad32 and / or Linrad64 can run at with the
> AFE822x in dual channel mode?*
>
> Clearly, running at the maximum that the AFE822x can handle in dual channel
> mode ( 1 MHz) is not possible.
> I intend to use Linrad for Medium Wave DX'ing and would like to have the
> largest possible BW in order to be able
> to scan the band without changing the mid frequency of the sampled band.
>
> Another question; *Is it possible to make an asymmetric IF-filter for AM?*

Ingolf Larsson (SM6FHZ)

unread,
Feb 16, 2025, 12:21:56 PMFeb 16
to Linrad
Hej Leif.

Thanks for the answer.

The difference seems to be the ADC clock frequency.
In mine the "AFEDRI Control Box" says 76.8 MHz for the "FrontEnd Main Clock Frequency".
I guess I have to compensate for that difference (80 vs. 76.8 MHz) and chose a BW that is a certain fraction of the clock frequency.
76.8 / 80= 960 kHz? Or some other fraction?
Or what BW do you recommend to chose with that clock frequency?

Another question; Is it possible to make an asymmetric IF-filter for AM?
In order to filter away adjacent AM-stations on one side of the wanted station.
I have not been able to find a way to do that?


73 / Ingolf

Ingolf Larsson (SM6FHZ)

unread,
Feb 16, 2025, 12:36:08 PMFeb 16
to Linrad
Leif.

Yes, I run it over the Internet with a 100 Mbps connection in both ends.
I regularly run my AFEDRI Net with 43 Mbps over the same line over extended time periods without any problems.
But I will look into that in more depth to make sure that it isn't a bottle neck.

73 / Ingolf


Leif Asbrink

unread,
Feb 18, 2025, 3:35:50 AMFeb 18
to lin...@googlegroups.com
Hej Ingolf.

I have no idea what sampling rate to select with 76.8 MHz.

On this page the max sampling rate is specified as 1.2 MHz for
two RF channels with a bandwidth of 1.1 MHz.
https://www.afedri-sdr.com/index.php/new-afe822x-sdr-net-dual-channel

But, on the same page I also find:

"1. Ethernet Network connection.
This can now provide up to 2000kHz sample rate (in single channel mode
two quadrature channels, 2 x I/Q 16-bit sample size) and up to 1000kHz
for each reception channel (in Dual Channel mode, 4 x I/Q 16-bit sample size)"

I suggest you put the question on the Afedri mailing list:
afed...@groups.io

When you listen to AM and want to suppress one sideband,
just set a narrower mandwidth and tune off-center for optimum
signal quality. That is what to do with any receiver...

In Linrad you have more options. You can listen to AM in
coherent mode. That is a synchronous detector giving I and Q
and you can select if you want I to one ear and Q to the other or
if you want I to both ears.

There is a button Sh by which you can shift the passband while
leaving the filter for the carrier at the center.

In case the interference level is modest you can apply a notch
filter for the offending carrier(s)

Notches and filter shift are only available when filtering is
done in the frequency domain.

To find out what available options are, use the F1 key or '!' with
the mouse pointer on a control box.

73 / Leif



> Hej Leif.
>
> Thanks for the answer.
>
> The difference seems to be the ADC clock frequency.
> In mine the "AFEDRI Control Box" says 76.8 MHz for the "FrontEnd Main Clock
> Frequency".
> I guess I have to compensate for that difference (80 vs. 76.8 MHz) and
> chose a BW that is a certain fraction of the clock frequency.
> 76.8 / 80= 960 kHz? Or some other fraction?
> Or what BW do you recommend to chose with that clock frequency?
>
> To view this discussion visit https://groups.google.com/d/msgid/linrad/e23834f3-aa75-40c0-a1dd-965cb0dd7ba5n%40googlegroups.com.

Leif Asbrink

unread,
Feb 18, 2025, 3:49:44 AMFeb 18
to lin...@googlegroups.com
Ingolf,

I suggest you bring the Afedri home temporarily to investigate
how it works on a local network. For two channels you need 64 Mbps
and even though you have a 100 Mbps connection it may be
inadequate because maybe 100 Mbps is the average speed that
you experience when downloading a big file but the instantaneous
speed may vary to some extent.

73 / Leif

Rick Kunath

unread,
Feb 18, 2025, 2:21:51 PMFeb 18
to lin...@googlegroups.com, Leif Asbrink
Leif,

Where is that Sh button? I know about the T, B, P button at the bottom
left of the waterfall with the green lines. That never seemed to do
anything, probably I am not using the right combination of keystrokes.

But I don't recall an Sh button in the frequency domain mode?

73,

Rick Kunath, K9AO

Rick Kunath

unread,
Feb 18, 2025, 9:59:24 PMFeb 18
to lin...@googlegroups.com, Leif Asbrink
I see the Sh now Leif. I must have been blind.

Sorry for the confusion.

Rick Kunath, K9AO

Ingolf Larsson (SM6FHZ)

unread,
Feb 19, 2025, 4:27:18 AMFeb 19
to Linrad
Hej Leif.

I just checked the AFE822x at 2 MHz single channel mode with SDRconsole and it runs flawlessly at 64 Mbps over my remote to home Internet connection.
So, I think it should work with two channels at 1 MHz BW as well.
I will try with Linrad at say 666.67 kHz BW and two channels and see if that works and report back.

73 / Ingolf

Ingolf Larsson (SM6FHZ)

unread,
Feb 20, 2025, 3:48:00 AMFeb 20
to Linrad
Hej Leif.

I have now tried with different sampling rates (666667, 500000) in both the 32 bit and the 64 bit Linrad I have installed.
Neither of the tried sampling rates worked, I just got error messages and I'm now back to 250 kHz.
It seems to be very difficult to get a wider BW working, or it might be my ignorance in the subject that is the major hurdle.
I might try to post a question on the AFEDRI forum and see if Alex might be able give an clue how to do.

73 / Ingolf

Leif Asbrink

unread,
Feb 20, 2025, 2:25:46 PMFeb 20
to lin...@googlegroups.com
Hello Rick,

Did you press F1 on the T, B, P button? You should then have seen:
----------------------------------------------------------------------
[319]This box shows the current tuning mode. Tuning can be made
either with a wheel mouse or with the arrow keys. (Use '+' or '-'
to set the tuning step size)

Click the box or press 'M' to select one of these modes:

T = Tune center frequency.
P = Tune passband. (Center freq + BFO)
B = Change BFO frequency.
----------------------------------------------------------------------
The Sh button is available in AM mode only and only with filtering
in the frequency domain.

With the mouse in the appropriate box you can get this message:

-----------------------------------------------------------------------
[88]There are two different implementations of the baseband filter
and resampler.
1) Back transformation from fft3 where points are weighted according
to the yellow curve in the baseband graph. This is the old implementation
that was the only alternative up to Linrad-02.58.
This method is by far most CPU efficient for wide filters with steep
skirts. Signals that fall on the steep skirts get distorted in case
the shape is determined essentially by the window function in use.
Such distortion does not affect AM, CW or SSB reception provided
that the selected filter is much wider (20 times or more) than
the frequency response of an individual FFT bin.
This method is not suitable for wideband I/Q output through
the network and it requires fairly large sizes for fft3 and therefore
it gives a substantial increase in the time delay from antenna to
loudspeaker.

2) FIR filter with timf3 as input. This is the conventional SDR solution.
It was is introduced in Linrad-02.59
It is possible to select a baseband filter with only one bin
and thereby produce a filter that is entirely determined by the
window function in use for fft3.
Very small sizes for fft3 can be used and therefore this method
can provide a very short time delay from antenna to loudspeaker.
This method can not be used for large fft3 sizes at high baseband
sampling speeds because it would overload the CPU.
------------------------------------------------------------------------

The Sh button is only available in mode 1

73

Leif
> --
> There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
> http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
> ---
> You received this message because you are subscribed to the Google Groups "Linrad" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/linrad/16c6d839-3eeb-4e11-bb56-bf6f1425a436%40gmail.com.

Rick Kunath

unread,
Feb 20, 2025, 2:32:45 PMFeb 20
to lin...@googlegroups.com, Leif Asbrink
Thanks Leif :)

Rick

O

Leif Asbrink

unread,
Feb 21, 2025, 5:05:08 AMFeb 21
to lin...@googlegroups.com
Hej Ingolf.

I wrote the code long ago for the SDR-IP and I remember nothing about it.

One thing you might try is to force a lower DMA rate. That should make
Linrad allocate bigger buffers. Set min DMA equal to max DMA and a value
several times smaller than the DMA Linrad is setting automatically.

Do you get any error message when Linrad fails at a too high speed?

73

Leif

Ingolf Larsson (SM6FHZ)

unread,
Feb 21, 2025, 8:47:28 AMFeb 21
to Linrad
Hej Leif.

Thanks for engaging in my questions.

I'm not familiar with what DMA-rate is, but I will try to set both Max DMA rate and Min DMA rate to say [10]. Presently Max DMA rate is [300] and Min DMA rate is [30].
Is that value [10] a resonable start?

Yes, I did get a error message (embedded in the text in my original question):

"However after I installed the 64 bit version I get an error message in the spectrum screen area of Linrad "RX AD SPEED ERROR: 1009278Hz (nominal 997406Hz) DA SYNC ERRORS 2" in both the 32 Bit AND 64 Bit version of Linrad."

However, it does not tell me much.

73 / Ingolf

Leif Asbrink

unread,
Feb 21, 2025, 1:25:03 PMFeb 21
to lin...@googlegroups.com
Hej Ingolf.

DMA rate, direct memory access is the rate of interrupts specified
for a soundcard to use. Setting it high makes latency smaller because
the DMA buffers become smaller. I do not remember how the network
hardware operates, if it issues an interrupt for each network package
or if it issues an interrupt once a specified amount of data is received.

When you press 'T' you will see what "DMA rate" is actually in use.
It is given by the block size in the transfer from hardware to the
buffer for fft1 transforms. When the fft1 size is large Linrad would
set a large buffer and for small fft1 size a small buffer. Always within
the limits of min and max.

73

Leif
> --
> There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
> http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
> ---
> You received this message because you are subscribed to the Google Groups "Linrad" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/linrad/51d9af68-bc96-4564-869e-ebf535dc03fan%40googlegroups.com.

Conrad Farlow

unread,
Mar 7, 2025, 3:31:47 PMMar 7
to lin...@googlegroups.com

Hello Ingolf, the 76.8MHz sample rate is because of the actual Xtal clock frequency. 76.8MHz = 76800kHz, which is a whole number integer for 48kHz. I presume that the FW is programmed for the hardware variant and Xtal. It is supposedly easier to use integers and will most likely end up with less audio artefacts, depending on the software used. I have no idea what this means over a network! I suppose that there is no need to worry about 80MHz, your hardware uses 76.8MHz by that logic perhaps 1600kHz would work well?

 

I have both 80MHz and 76.8MHz clocks in my various Afedri devices.  Is there any advantage in running integer multiples? I don’t know, I suppose that there must be sample rate convertors running somewhere. I am sure Leif can tell us.

 

Regards

 

Conrad PA5Y

Reply all
Reply to author
Forward
0 new messages