Hi,
I'm using a bladerf 2.0 A9 unit. I've installed the gr-bladeRF source block, and I have it working. I've experimented with providing a 10 MHz external reference through the J95 connector. I notice that the gnuradio source block has an entry to specify the reference frequency, but nowhere to enable the ADF4002. The bladeRF-cli program has "set clock_ref enable", but not the source block. But I notice that when I turn on my external 10 MHz reference (a Bliley OCXO) the spectrum of a continuous tone really cleans up, losing its big phase noise sidebands. So is the blade automatically sensing the external reference? Or is there a need to include the clock_ref in the source block.
Thanks much!
setting clock_ref in gr-bladeRF
-
- Posts: 6
- Joined: Fri May 20, 2022 4:42 pm
Re: setting clock_ref in gr-bladeRF
I'll answer my own question: looking at the source for the gr-bladeRF source block, I see that in bladerf_common.cc we have
So only if the frequency freq entered into the block is nonzero does init_refclk get called. In the init_refclk routine:
So it seems it is the block code enabling the ADF4002. The board isn't detecting the presence of the reference signal and then enabling the pll.
Code: Select all
if(dict.count("ref_clk"))
{
auto freq = boost::lexical_cast<int>(_get(dict,"ref_clk"));
if(freq)
{
init_refclk(freq);
}
else
...
Code: Select all
...
status = bladerf_set_pll_enable(_dev.get(), true);
...
-
- Posts: 1
- Joined: Wed Aug 27, 2025 1:57 am
Re: setting clock_ref in gr-bladeRF
It sounds like the bladeRF 2.0 is automatically detecting and locking to the external 10 MHz reference — especially since you're seeing reduced phase noise. While the GNURadio source block doesn’t expose a setting for clock_ref, the hardware likely enables the ADF4002 when it detects a valid signal. For reliability, you can run set clock_ref external via bladeRF-cli before starting your flowgraph. That should ensure proper locking.[email protected] wrote: ↑Fri May 20, 2022 5:03 pm Hi,
I'm using a bladerf 2.0 A9 unit. I've installed the gr-bladeRF source block, and I have it working. I've experimented with providing a 10 MHz external reference through the J95 connector. I notice that the gnuradio source block has an entry to specify the reference frequency, but nowhere to enable the ADF4002. The bladeRF-cli program has "set clock_ref enable", but not the source block. But I notice that when I turn on my external 10 MHz reference (a Bliley OCXO) the spectrum of a continuous tone really cleans up, losing its big phase noise sidebands. So is the blade automatically sensing the external reference? Or is there a need to include the clock_ref in the source block.
Thanks much!
Eggy Car is a pleasant and lighthearted game that provides both leisure and challenge.
-
- Posts: 1
- Joined: Wed Aug 27, 2025 6:46 pm
Re: setting clock_ref in gr-bladeRF
Thanks for the clarification on clock_ref—setting it correctly really helped improve stability in my setup. Appreciate the support from the community! Stickman Hook