mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/cc2538: use RX FIFO count to determine CRC OK location
This commit is contained in:
parent
06aaf648e3
commit
81358aa7b3
@ -412,9 +412,9 @@ void cc2538_irq_handler(void)
|
||||
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user