Page 1 of 1

Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Thu Apr 18, 2024 4:37 am
by Deadshot
I want to implement a FMCW or a pulsed radar using a SDR I tried using Pluto sdr but that does not have any synchronization mechanisms, I do have a BladeRF in my laboratory and I saw that in the API to control the bladeRF there is a bladerf_sync_config(), bladerf_sync_rx(), bladerf_sync_tx() functions. So, I wanted to know that if I use these functions in my code then will the TX and the RX signals be tine synchronized.

I have put up a similar question in the bladerf github issues.

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Thu Apr 18, 2024 6:09 am
by venky0108
on the same board, it can be time synchronized by using trigger functionality of bladerf. Making Tx channel master & Rx channel slave. When trigger is fired, sampling starts.

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Thu Apr 18, 2024 9:00 am
by Deadshot
is there a sample code available to implement the functionality described by you. Because I am not familiar with the API for bladerf and I am in a bit of a hurry so can't waste much time figuring it out. The connection and the transmission part I can handle but the syncing I need help for that.

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Mon Aug 19, 2024 7:23 pm
by heidenmaverick
Deadshot wrote: Thu Apr 18, 2024 4:37 am I want to implement a FMCW or a pulsed radar using a SDR I tried using Pluto sdr but that does not have any synchronization mechanisms, I do have a BladeRF in my laboratory and I saw that in the API to control the bladeRF there is a bladerf_sync_config(), bladerf_sync_rx(), bladerf_sync_tx() functions. So, I wanted to know that if I use these functions in my code then will the TX and the RX signals be tine synchronized.

I have put up a similar question in the bladerf github issues.
Over multiple boards, it is possible to achieve time synchronization through the use of bladerf's trigger capabilities. Setting the transmit channel as master and the receive channel as slave. Sampling begins upon detection of a trigger.

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Sat Aug 24, 2024 12:21 am
by azizgarbayo
Play drift boss directly in your web browser without the need to download it. Experience seamless gaming with no lag, little delay, and exceptional quality when playing this browser game.

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Sat Aug 24, 2024 12:06 pm
by ghbjakef3
I am also interested in this trigger function. I'm not sure how to implement it but I'm going to be on the lookout.

Now, I've been experimenting and trying to verify if using the `get_timestamp` function returns a counter value, from the FPGA, that is used by both the RX and TX streams? For example, if you want synchronized RX and TX you might do something like this.

Code: Select all

TX THREAD
  call get_timestamp and add 100milliseconds to the value
  send initial timestamp value back to RX thread
  do FLAG_TX_BURST_START with timestamp field set to that value; send SAMP samples
  loop
    do all other back to back transmissions with flags set to zero; send SAMP samples

RX_THREAD
  receive some samples using meta; RX SAMP * 2 samples
  let synchronized_offset = samps - ((meta.timestamp - initial_timestamp) % samps as u64) as usize;
So, now you have a synchronized offset. You actually grabbed two periods of a transmit and found
the start of one of the periods. I'm still wondering if this is correct. Let me know if you test it out
and it works.

EDIT:

I found the page on triggers. It is https://www.nuand.com/libbladeRF-doc/v2 ... ctionality..

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Thu Aug 29, 2024 12:27 am
by bartell2
What considerations should be taken into account when using the FLAG_TX_BURST_START to ensure accurate timing in the transmission process geometry dash breeze?

Re: Synchronization of TX and RX Signals in BladeRF 2.0 xA9

Posted: Thu Aug 29, 2024 5:18 pm
by ghbjakef3
bartell2 wrote: Thu Aug 29, 2024 12:27 am What considerations should be taken into account when using the FLAG_TX_BURST_START to ensure accurate timing in the transmission process geometry dash breeze?
If your subsequent calls to sync_tx are with meta.flags set to zero then those samples will be appended. You can use FLAG_TX_BURST_END to stop and then issue another FLAG_TX_BURST_START with a new timestamp value. Or, you can do both FLAG_TX_BURST_START | FLAG_TX_BURST_END to send a one shot at the specific timestamp. You also have FLAG_TX_NOW which ignores the timestamp and sends immediately.

Here is a page with some more details:
https://www.nuand.com/libbladeRF-doc/v2 ... a_t_a.html