Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/cc2538: use RX FIFO count to determine CRC OK location #20956

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpu/cc2538/radio/cc2538_rf_radio_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
RFCORE_XREG_CSPY = cc2538_min_be; /* Holds MinBE */

assert(cc2538_csma_ca_retries >= 0);
RFCORE_XREG_CSPZ = cc2538_csma_ca_retries + 1; /* Holds CSMA-CA attempts (retries + 1) */

Check warning on line 157 in cpu/cc2538/radio/cc2538_rf_radio_ops.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters

RFCORE_XREG_CSPCTRL &= ~CC2538_CSP_MCU_CTRL_MASK;

Expand Down Expand Up @@ -391,7 +391,7 @@

if ((flags_f0 & SFD)) {
handled_f0 |= SFD;
switch(cc2538_state) {

Check warning on line 394 in cpu/cc2538/radio/cc2538_rf_radio_ops.c

View workflow job for this annotation

GitHub Actions / static-tests

keyword 'switch' not followed by a single space
case CC2538_STATE_READY:
cc2538_rf_hal->cb(cc2538_rf_hal, IEEE802154_RADIO_INDICATION_RX_START);
break;
Expand All @@ -412,9 +412,9 @@

if (flags_f0 & RXPKTDONE) {
handled_f0 |= RXPKTDONE;
/* CRC check */
uint8_t pkt_len = rfcore_peek_rx_fifo(0);
if (rfcore_peek_rx_fifo(pkt_len) & CC2538_CRC_BIT_MASK) {
/* CRC_OK bit is in the last byte in the RX FIFO */
uint8_t crc_loc = RFCORE_XREG_RXFIFOCNT - 1;
if (rfcore_peek_rx_fifo(crc_loc) & CC2538_CRC_BIT_MASK) {
/* Disable RX while the frame has not been processed */
_disable_rx();
/* If AUTOACK is disabled or the ACK request bit is not set */
Expand Down Expand Up @@ -485,7 +485,7 @@
const network_uint16_t *short_addr = value;
const eui64_t *ext_addr = value;
const uint16_t *pan_id = value;
switch(cmd) {

Check warning on line 488 in cpu/cc2538/radio/cc2538_rf_radio_ops.c

View workflow job for this annotation

GitHub Actions / static-tests

keyword 'switch' not followed by a single space
case IEEE802154_AF_SHORT_ADDR:
RFCORE_FFSM_SHORT_ADDR0 = short_addr->u8[1];
RFCORE_FFSM_SHORT_ADDR1 = short_addr->u8[0];
Expand All @@ -511,10 +511,10 @@
return 0;
}

static int _config_src_addr_match(ieee802154_dev_t *dev, ieee802154_src_match_t cmd, const void *value)

Check warning on line 514 in cpu/cc2538/radio/cc2538_rf_radio_ops.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
{
(void) dev;
switch(cmd) {

Check warning on line 517 in cpu/cc2538/radio/cc2538_rf_radio_ops.c

View workflow job for this annotation

GitHub Actions / static-tests

keyword 'switch' not followed by a single space
case IEEE802154_SRC_MATCH_EN:
RFCORE_XREG_FRMCTRL1 &= ~CC2538_FRMCTRL1_PENDING_OR_MASK;
if (*((const bool*) value) == true) {
Expand Down
Loading