SFD timestamp

Only save SFD timestamp when we are actually receiving.
This commit is contained in:
thomas-ha 2016-03-07 18:34:54 +01:00
parent b0a673ca5c
commit 73d36ebb6b

View File

@ -1075,8 +1075,10 @@ cc2538_rf_rx_tx_isr(void)
#if CC2538_RF_CONF_SFD_TIMESTAMPS #if CC2538_RF_CONF_SFD_TIMESTAMPS
if(poll_mode) { if(poll_mode) {
if(REG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_RX_ACTIVE) {
cc2538_sfd_rtime = RTIMER_NOW(); cc2538_sfd_rtime = RTIMER_NOW();
} }
}
#endif #endif
if(!poll_mode) { if(!poll_mode) {