HI, I am using the following configuration to configure the RARGPO1 to indicate the sync word reception:
Output sync found signal on RATGPO1
static uint32_t pOverrides[] =
{
........
(uint32_t)0x008F88B3,
HW_REG_OVERRIDE(0x1110, RFC_DBELL_SYSGPOCTL_GPOCTL0_CPEGPO0 | //RFC_GPO0 //LNA enable
RFC_DBELL_SYSGPOCTL_GPOCTL1_CPEGPO1 | //RFC_GPO1 //PA enable - we don't need it
RFC_DBELL_SYSGPOCTL_GPOCTL2_RATGPO1 | // RFC_GPO2 (sync found) //RFC_GPO2 //sync found
RFC_DBELL_SYSGPOCTL_GPOCTL3_RATGPO0), //RFC_GPO3 //TX start - we don't need it
(uint32_t)0xFFFFFFFF,
}
In application:
#define DEFINE_LED_FOR_SYNC_ACTIVITY_MONITORING(led) PINCC26XX_setMux(ledPinHandle, led, PINCC26XX_MUX_RFC_GPO2);
Here the results:
EVB_SND – PA is enabled ( packet transmit indication)
EVB_LNA - LNA enabled ( receive indication)
EVB_SYNC – high when sync is found in the receiver, and low when the packet is received or reception aborted)
Packet parameters:
Preamble length:8
Sync length:2
Length field length:1
Data length:17
CRC length :2
Total: 30 byte
Datarate:50000
We see that :EVB_SYNC duration is 3.28 msec (20byte)
EVB_SYNC goes low 340mcs after end of packet transmission.
So transmission duration 30*8/50000=4.8 msec
We see that EVB_SND duration is 5 msec.
Q1: How can we estimate start of preamble transmission ?
Q2: When SYNC was found?
Q3: Why packet transmition duration is more than packet length?(transition to TX mode duration was included?)
Another problem:
Actually I tried to synchronize Rx and TX as following(sorry for long explanation).
1. Tx send beacon (see Packet parameters earlier) every TbeaconPeriod (TBD)
2. Init state: RX command send and application waits for beacon Twait2beacon>T beacon.If beacon was received , Packet Time Stamp is updated and state
equal to Sync state.
3. Sync state: When beacon was received, Radio is switched off, Application goes to sleep for Tsleep(standby) period..
After sleep RX command send and application waits for beacon Twait2beacon timeout.
I am using rfEasyLinkRx example for implementation.
Every Rx command configured as following:
EasyLink_cmdPropRxAdv.startTrigger.triggerType = TRIG_NOW;
EasyLink_cmdPropRxAdv.startTrigger.pastTrig = 1;
EasyLink_cmdPropRxAdv.startTime = 0;
EasyLink_cmdPropRxAdv.endTrigger.triggerType = TRIG_ABSTIME;
//EasyLink_cmdPropRxAdv.endTime = RF_getCurrentTime() + asyncRxTimeOut;
//asyncRxTimeOut contained RF timer current time
EasyLink_cmdPropRxAdv.endTime = asyncRxTimeOut;
For every Rx command the following parameters calculated in RF timer ticks:
EasyLink_cmdPropRxAdv.endTime - Time Stamp, should take into account Start of packet Time stamp plus Preamble and Sync word duration to ensure end of Rx in the case of failure
rxEndPacket Time stamp for end of packet reception, used for Twait2beacon calculation. Should take into account Start of packet
Time stamp and Packet duration.
//here the code
while(1)
{
//calculate asyncRxTimeOut,rxEndPacket, end Tsleep.
if(SyncData.beaconInterval2Sleep)
{
Task_sleep(SyncData.beaconInterval2Sleep);
}
else
{
//it's Init state, immediately start RX, all parameters actually offset from the Start of Packet Time Stamp
UInt32 ts = RF_getCurrentTime();
.rxEndTime += ts;
rxEndPacket += ts;
}
//set asyncRxTimeOut
EasyLink_setCtrl(EasyLink_Ctrl_AsyncRx_TimeOut,rxEndTime);
//start receive
EasyLink_receiveAsync(rxDoneCb, 0);
//calculate Twait2beacon
ts = RF_getCurrentTime();
timeoutRfTick = calculateInterval( .rxEndPacket, ts);
Twait2beacon = ((timeoutRfTick)/(4*Clock_tickPeriod));
if(Semaphore_pend(rxDoneSem, Twait2beacon ) == FALSE)
{
....
}
else
{
update Start of packet Time Stamp with rxStatistics.timeStamp taken in rxDoneCallback(), see Easy_Link.c
}
//here I want to close the radio to ensure the standby mode
}
When I calculate the asyncRxTimeOut,rxEndPacket, end Tsleep parameters on the base of rxStatistics.timeStamp, packet parameters(length), datarate
I see (with the scope) that calculation is wrong so I need to add some magic number to the data.
Start of packet Time Stamp - rxStatistics.timeStamp plus TbeaconPeriod
EasyLink_cmdPropRxAdv.endTime - should take into account Start of packet Time stamp plus Preamble and Sync word duration to ensure end of Rx in the case of failure
rxEndPacket Time stamp for end of packet reception, used for Twait2beacon calculation. Should take into account Start of packet
Time stamp and Packet duration.
Q4: how to calculate the asyncRxTimeOut,rxEndPacket, end Tsleep parameters on the base of rxStatistics.timeStamp, packet parameters(length), datarate?
Which internal RF driver process duration to take into account?
Q5: how to close the Radio( EasyLink_init(EasyLink_Phy_Custom),EasyLink_abort())?
BR
Leonid



