Friday, March 4, 2022

Re: RX/TX switching

Hi Johannes,

Yes this is exactly my problem : after unlocking the flowgraph, I get
some underruns (only, no overrun).

Do you have an example of code using EOB/SOB ? Ok for sending EOB before
locking but is it necessary to send a SOB also and when ?

Your suggestion of idling the TX flowgraph is something I looked for
during several days but I never found how. Indeed, if I do not connect a
source and a sink at each ends, gnuradio will fail to run. How to stop
feeding one branch of a flowgraph ? Do you have examples of codes for
doing that ?

Thanks for your help,

Fabien, F4CTZ.

Le 04/03/2022 à 12:03, Johannes Demel a écrit :
> Hi Fabien,
>
> do those underruns occur after you lock/unlock and switch from TX to
> RX or vice versa? Do you see overruns as well?
>
> I'd assume the USRP expects a constant sample flow and even a short
> interuption, like your lock/unlock task interrupts that flow.
> Still assuming this is the root cause, you might fix this by sending
> an EOB signal to the USRP before you lock the flowgraph.
>
> Besides, the whole SOB/EOB mechanism might help you with your issue.
> You can just stop the TX flowgraph portion while you don't need it. By
> stop I mean, the flowgraph is not fed any new samples and just idles.
> As an added bonus, you minimize LO leakage which might be an issue for
> your RX flowgraph. I know this is a more intrusive change.
>
> Cheers
> Johannes
>
> On 04.03.22 10:45, Fabien PELLET wrote:
>> Hello again,
>>
>> I build a flowgraph in C++ with an RX chain and a TX chain. I'm using
>> a USRP N210. When I'm in RX, the TX chain is connected to a constant
>> zero source and feed a null sink and the RX chain is connected to
>> USRP source and sink. When I'm in TX, it is the opposite.
>>
>> I have to keep the two chains running at the same time for switching
>> speed purpose and do not have to stop the flowgraph and restart it.
>> So for my switching, I just lock the top block and unlock it after.
>>
>> If I always stay in RX, I have no underrun. Same thing in TX. My
>> problem is that when I lock and unlock the flowgraph, I get a lot of
>> underruns.
>>
>> As a test, I remove the TX part of my flowgraph and only keep the RX
>> part and I try do some lock/unlock sometimes : same problem with
>> underruns.
>>
>> How to do lock/unlock safely in C++ to avoid underruns ?
>>
>> Thanks for the help,
>>
>> Best regards,
>>
>> Fabien, F4CTZ.
>>
>>
>

No comments:

Post a Comment