External TDD PA/LNA using GPIO #276
-
Hello, I am trying to run an external TDD PA/LNA with a USRP X300 using its front panel GPIO pins, which output high/low signals to toggle PA or LNA. The logic is outputting GPIO high (PA on, LNA off) when the USRP needs to transmit and outputting GPIO low (PA off, LNA on) when the USRP needs to receive. There is a post on the same topic #43 so I tried the suggested method in there. I put the code of outputting GPIO high in the code block if (md.start_of_burst) (SRS version is 23_10 so the variable name is slightly different) suggested by @rainey19, and the code of outputting GPIO low in the code block if (md.end_of_burst). The result is that the GPIO is always high. I did a bit more reading of the FSM written in lib/radio/uhd)/radio_uhd_tx_stream_fsm.h and found that the FSM only comes into START_BURST state once at initialization and stays in IN_BURST state forever, so the code pretty much never goes into the code blocks if (md.start_of_burst) nor if (md.end_of_burst). I also tried putting the GPIO code directly in every call of radio_uhd_tx_stream::transmit_block and radio_uhd_rx_stream::receive_block but this resulted too many late and underflow. Could someone point me to the right direction of implementing this? Many thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
FWIW. My team ran into this issue last week and we have added the necessary end-of-burst messaging. This required plumbing information about the type (UL or DL) for the current slot/symbols from the MAC down to the PHY, as well as making some small timing adjustments to make up for the switching delay. Our patched version of the code is now working for us outdoors with a front end and we plan to do some cleanup and submit a pull request in the near future. |
Beta Was this translation helpful? Give feedback.
-
what about using timed commands available in the UHD API and scheduling a GPIO change just before TX time? Then scheduling another command to toggle the GPIO after TX. |
Beta Was this translation helpful? Give feedback.
-
Hi there, As of last week's release, srsRAN includes a discontinuous transmission mode which may address your needs. At this moment, the feature is experimental, we are still testing it and open to feedback. You can take a look at the feature announcement discussion for more details. |
Beta Was this translation helpful? Give feedback.
FWIW. My team ran into this issue last week and we have added the necessary end-of-burst messaging. This required plumbing information about the type (UL or DL) for the current slot/symbols from the MAC down to the PHY, as well as making some small timing adjustments to make up for the switching delay. Our patched version of the code is now working for us outdoors with a front end and we plan to do some cleanup and submit a pull request in the near future.