1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/cc2538_rf: disable RX detection during CCA

This commit is contained in:
Jose Alamos 2021-08-09 11:37:17 +02:00
parent 39d27c2f7c
commit 3fce21a62b
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9
2 changed files with 6 additions and 0 deletions

View File

@ -110,6 +110,8 @@ extern "C" {
#define CC2538_STATE_SFD_WAIT_RANGE_MAX (0x06U) /**< max range value of SFD wait state */
#define CC2538_FRMCTRL1_PENDING_OR_MASK (0x04) /**< mask for enabling or disabling the
frame pending bit */
#define CC2538_FRMCTRL0_RX_MODE_DIS (0xC) /**< mask for disabling RX Chain during
CCA */
#define RFCORE_ASSERT(expr) (void)( (expr) || RFCORE_ASSERT_failure(#expr, __FUNCTION__, __LINE__) )

View File

@ -104,6 +104,8 @@ static int _request_transmit(ieee802154_dev_t *dev)
else {
cc2538_cca = false;
/* Disable RX Chain for CCA (see CC2538 RM, Section 29.9.5.3) */
RFCORE_XREG_FRMCTRL0 |= CC2538_FRMCTRL0_RX_MODE_DIS;
RFCORE_SFR_RFST = ISRXON;
/* Clear last program */
RFCORE_SFR_RFST = ISCLEAR;
@ -314,6 +316,8 @@ static int _request_set_trx_state(ieee802154_dev_t *dev, ieee802154_trx_state_t
case IEEE802154_TRX_STATE_RX_ON:
RFCORE_XREG_RFIRQM0 |= RXPKTDONE;
RFCORE_SFR_RFST = ISFLUSHRX;
/* Enable RX Chain */
RFCORE_XREG_FRMCTRL0 &= ~CC2538_FRMCTRL0_RX_MODE_DIS;
RFCORE_SFR_RFST = ISRXON;
break;
}