aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-05-24 19:28:09 -0400
committerTom Tsou <tom.tsou@ettus.com>2015-06-01 16:06:02 -0700
commit6a2bf0d87b215860e76d1866885ae552b0ba63fe (patch)
tree43134b96a370178b5a6d9d54aa54c1253ea819ef
parent2966048b07188e1562b805a19cd0108d837c7abb (diff)
transceiver: Drive clock indication form the receive thread.
Receive thread receives data from the device, which is a more stable source of clocking than the transmit side. If transmit side has a hiccup, osmo-trx doesn't send the clock indication, and transmit side is getting completely lost in time. With this patch we ensure that clock indication keeps coming. Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
-rw-r--r--Transceiver52M/Transceiver.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 66a2e21..4288f1d 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -861,15 +861,6 @@ bool Transceiver::driveTxPriorityQueue(size_t chan)
for (int i = 0; i < 4; i++)
frameNum = (frameNum << 8) | (0x0ff & buffer[i+1]);
- // periodically update GSM core clock
- LOG(DEBUG) << "mTransmitDeadlineClock " << mTransmitDeadlineClock
- << " mLastClockUpdateTime " << mLastClockUpdateTime;
-
- if (!chan) {
- if (mTransmitDeadlineClock > mLastClockUpdateTime + GSM::Time(216,0))
- writeClockInterface();
- }
-
LOG(DEBUG) << "rcvd. burst at: " << GSM::Time(frameNum,timeSlot);
int RSSI = (int) buffer[5];
@@ -890,8 +881,12 @@ bool Transceiver::driveTxPriorityQueue(size_t chan)
void Transceiver::driveReceiveRadio()
{
- if (!mRadioInterface->driveReceiveRadio())
+ if (!mRadioInterface->driveReceiveRadio()) {
usleep(100000);
+ } else {
+ if (mTransmitDeadlineClock > mLastClockUpdateTime + GSM::Time(216,0))
+ writeClockInterface();
+ }
}
void Transceiver::driveReceiveFIFO(size_t chan)