Transceiver52M: Generate RACH correlation sequence at initialization
There is no temporal dependency on when the RACH sequence is generated, so there is no need for transceiver to create it in response to a command from GSM core. If we power on the transceiver, we will need the RACH sequence, so just allocate it during initialization. Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
parent
6aa1f18f41
commit
e57004d0c3
|
@ -501,7 +501,6 @@ void Transceiver::driveControl()
|
|||
// Prepare for thread start
|
||||
mPower = -20;
|
||||
mRadioInterface->start();
|
||||
generateRACHSequence(mSPS);
|
||||
|
||||
// Start radio interface threads.
|
||||
mFIFOServiceLoopThread->start((void * (*)(void*))FIFOServiceLoopAdapter,(void*) this);
|
||||
|
|
|
@ -160,6 +160,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
Transceiver *trx = new Transceiver(trxPort, trxAddr.c_str(),
|
||||
SAMPSPERSYM, GSM::Time(3,0), radio);
|
||||
if (!trx->init()) {
|
||||
LOG(ALERT) << "Failed to initialize transceiver";
|
||||
}
|
||||
trx->receiveFIFO(radio->receiveFIFO());
|
||||
trx->start();
|
||||
|
||||
|
|
|
@ -244,11 +244,21 @@ void initGMSKRotationTables(int sps)
|
|||
}
|
||||
}
|
||||
|
||||
void sigProcLibSetup(int sps)
|
||||
bool sigProcLibSetup(int sps)
|
||||
{
|
||||
if ((sps != 0) && (sps != 2) && (sps != 4))
|
||||
return false;
|
||||
|
||||
initTrigTables();
|
||||
initGMSKRotationTables(sps);
|
||||
generateGSMPulse(sps, 2);
|
||||
|
||||
if (!generateRACHSequence(sps)) {
|
||||
sigProcLibDestroy();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void GMSKRotate(signalVector &x) {
|
||||
|
|
|
@ -100,7 +100,7 @@ float vectorNorm2(const signalVector &x);
|
|||
float vectorPower(const signalVector &x);
|
||||
|
||||
/** Setup the signal processing library */
|
||||
void sigProcLibSetup(int sps);
|
||||
bool sigProcLibSetup(int sps);
|
||||
|
||||
/** Destroy the signal processing library */
|
||||
void sigProcLibDestroy(void);
|
||||
|
|
Loading…
Reference in New Issue