myriadrf / LimeSuiteNG

Apache License 2.0
9 stars 7 forks source link

Warning Messages when setting high Over-sampling rates with LimeSDR Mini #61

Open davecrump opened 1 month ago

davecrump commented 1 month ago

I am using the legacy api on a 64-bit bookworm install connected by USB to a LimeSDR Mini to generate a stream that is put into an fft and displayed. The basic code is the same as a legacy limesuite application that I have been using for 3 years.

When I call LMS_Calibrate at with low bandwidths and high over-sampling rates I get the error message

SetNCOFrequency(index = 0) - Frequency(-0.05904 MHz) out of range [0-11.52) MHz
SetNCOFrequency(index = 0) - Frequency(-0.05904 MHz) out of range [0-11.52) MHz

Here is a snippet of output with a higher bandwidth:

Change of Sample rate to 512000.0 requested
Stopping stream:          LMS_StopStream(&rx_stream)
Amend the bandwidth:      LMS_SetLPFBW(device, LMS_CH_RX, 0, 614400.0)
Amend sample rate:        LMS_SetSampleRate(device, 512000.0, 8)
Check sample rates:       LMS_GetSampleRate(device, LMS_CH_RX, 0, &sr_host, &sr_rf)
                          sr_host = 512000.0
                          sr_rf = 4096000.0
Destroy old stream:       LMS_DestroyStream(device, &rx_stream)
Set up the new stream:    LMS_SetupStream(device, &rx_stream)
Restart the stream:       LMS_StartStream(&rx_stream)
Calibrate again:          LMS_Calibrate(device, LMS_CH_RX, 0, 512000.0, 0)

and here is the same snippet, but with a lower bandwidth and higher over-sampling rate:

Change of Sample rate to 204800.0 requested
Stopping stream:          LMS_StopStream(&rx_stream)
Amend the bandwidth:      LMS_SetLPFBW(device, LMS_CH_RX, 0, 245760.0)
Amend sample rate:        LMS_SetSampleRate(device, 204800.0, 16)
Check sample rates:       LMS_GetSampleRate(device, LMS_CH_RX, 0, &sr_host, &sr_rf)
                          sr_host = 204800.0
                          sr_rf = 3276800.0
Destroy old stream:       LMS_DestroyStream(device, &rx_stream)
Set up the new stream:    LMS_SetupStream(device, &rx_stream)
Restart the stream:       LMS_StartStream(&rx_stream)
Calibrate again:          LMS_Calibrate(device, LMS_CH_RX, 0, 204800.0, 0)
SetNCOFrequency(index = 0) - Frequency(-0.05904 MHz) out of range [0-11.52) MHz
SetNCOFrequency(index = 0) - Frequency(-0.05904 MHz) out of range [0-11.52) MHz

The behaviour is the same with a LimeSDR Mini V1 and V2. The performance seems to be OK, but the warning message clearly indicates something not right.

Thanks, Dave

davecrump commented 2 weeks ago

I can confirm that these warnings are still generated with LimeSuiteNG commit ac93854 and Gateware v1.15 on a LimeNET Micro 2.0 DE.

Dave