contiki/cpu/cc2538/dev
George Oikonomou 568973f6ec Don't flush the CC2538 RF RX FIFO unconditionally
After reading a frame, `read()` checks the status of the RX FIFO:

* If an overflow is detected, the FIFO gets flushed
* If there are more frames in the FIFO, the `cc2538_rf_process` will get polled again in order to read out the next frame.

#1550 changed `read()`, which now performs the above check for non-poll mode, but it then flushes the FIFO unconditionally. Therefore, if there are two or more frames in the FIFO, they will get flushed before the `cc2538_rf_process` has had a chance to read them out. This results in missed frames.

Reproducing this is trivial: Build a CC2538 sniffer and see how it will never show you .15.4 ACK frames. ACK reception completes while `read()` is still streaming the previous captured frame to the host. Upon completion, the FIFO will get flushed and the ACK will get lost.

This pull proposes removing the unconditional flush and reverting to the original logic for non-TSCH operation.

Pinging @thomas-ha here for input regarding poll mode.

This pull sits on top of #1778
2016-07-17 00:24:47 +01:00
..
adc.c cc2538: Add adc driver and example 2013-12-06 22:07:45 +01:00
adc.h cc2538: Add adc driver and example 2013-12-06 22:07:45 +01:00
aes.c cc2538: aes: Fix possibly missing result available status 2016-06-23 22:25:27 +02:00
aes.h cc2538: aes: Add support for generic operations 2016-01-04 00:26:32 +01:00
ana-regs.h Corrected the register offset value of ANA_REGS_IVCTRL. TI was using the address offset instead of the physical address in their header file. 2014-12-19 04:14:34 -05:00
bignum-driver.c cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
bignum-driver.h cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
cbc-mac.c cc2538: Add crypto driver and example for AES-CBC-MAC 2016-01-06 23:22:53 +01:00
cbc-mac.h cc2538: Add crypto driver and example for AES-CBC-MAC 2016-01-06 23:22:53 +01:00
cbc.c cc2538: Add crypto driver and example for AES-CBC 2016-01-06 22:01:41 +01:00
cbc.h cc2538: Add crypto driver and example for AES-CBC 2016-01-06 22:01:41 +01:00
cc2538-aes-128.c CC2538: Reboot if the crypto engine fails (error handling is too hard) 2016-06-24 01:50:27 -07:00
cc2538-aes-128.h CC2538: Add AES-128 driver 2016-01-04 00:28:27 +01:00
cc2538-ccm-star.c cc2538: Add AES-CCM* driver 2016-01-04 00:28:27 +01:00
cc2538-ccm-star.h cc2538: Add AES-CCM* driver 2016-01-04 00:28:27 +01:00
cc2538-dev.h cc2538: Define and use device features 2015-11-19 01:18:33 +01:00
cc2538-rf.c Don't flush the CC2538 RF RX FIFO unconditionally 2016-07-17 00:24:47 +01:00
cc2538-rf.h moving macros to .c 2016-04-15 15:50:01 +02:00
cc2538-sensors.h Add generic header for CC2538 sensors 2015-05-12 23:42:18 +01:00
cc2538-temp-sensor.c Re-work the CC2538 driver to be a driver for the Srf06 ALS only 2015-05-12 23:42:19 +01:00
cc2538-temp-sensor.h Re-work the CC2538 driver to be a driver for the Srf06 ALS only 2015-05-12 23:42:19 +01:00
ccm.c cc2538: Add AES-CCM* driver 2016-01-04 00:28:27 +01:00
ccm.h cc2538: Add crypto driver and example for AES-CBC 2016-01-06 22:01:41 +01:00
cctest.h cc2538: Add adc driver and example 2013-12-06 22:07:45 +01:00
crypto.c cc2538: ccm: Make it possible to use the interrupt 2015-06-02 21:41:07 +02:00
crypto.h CC2538: Add AES-128 driver 2016-01-04 00:28:27 +01:00
ctr.c cc2538: Add crypto driver and example for AES-CTR 2016-01-06 23:22:53 +01:00
ctr.h cc2538: Add crypto driver and example for AES-CTR 2016-01-06 23:22:53 +01:00
ecb.c cc2538: Add crypto driver and example for AES-ECB 2016-01-04 00:28:26 +01:00
ecb.h cc2538: Add crypto driver and example for AES-ECB 2016-01-04 00:28:26 +01:00
ecc-algorithm.c cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
ecc-algorithm.h cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
ecc-curve.c cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
ecc-curve.h cc2538: Add PKA drivers, ECC algorithms and examples 2015-10-18 20:14:17 +02:00
ecc-driver.c cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
ecc-driver.h cc2538: pka: Fix include paths breakage 2016-01-09 15:43:13 +01:00
flash.h cc2538: Add configuration for firmware location 2016-06-19 23:12:02 +02:00
gcm.c cc2538: Add crypto driver and example for AES-GCM 2016-01-06 23:22:54 +01:00
gcm.h cc2538: Add crypto driver and example for AES-GCM 2016-01-06 23:22:54 +01:00
gpio.c cc2538: gpio: Fix missed interrupts 2015-04-27 01:14:51 +02:00
gpio.h cc2538: gpio: Add macros to get interrupt status 2015-04-27 01:14:51 +02:00
gptimer.h
i2c.c cc2538: Allow for configuration of processor speed 2015-05-19 18:55:55 +02:00
i2c.h I2C driver taken from PR #677, uncrustified, made functions static and added burst modes 2015-03-25 16:44:12 +01:00
ioc.c
ioc.h Improve wording 2015-02-16 10:17:58 +01:00
mpu.h
nvic.c cc2538: nvic: Simplify VTABLE configuration 2015-11-19 01:18:33 +01:00
nvic.h cc2538: Use &vectors instead of flash/.text start address 2015-11-19 01:18:33 +01:00
pka.c cc2538: Add PKA drivers, ECC algorithms and examples 2015-10-18 20:14:17 +02:00
pka.h cc2538: Add PKA drivers, ECC algorithms and examples 2015-10-18 20:14:17 +02:00
pwm.c cc2538: pwm: Automatically disable PM1+ if running 2015-12-13 02:39:55 +01:00
pwm.h cc2538: pwm: Automatically disable PM1+ if running 2015-12-13 02:39:55 +01:00
random.c Fix CC2538 random_init lockup 2014-04-13 14:38:00 +01:00
rfcore-ffsm.h
rfcore-sfr.h
rfcore-xreg.h cc2538: Add adc driver and example 2013-12-06 22:07:45 +01:00
rfcore.h
rom-util.h cc2538: Add driver for the rom utility function library 2013-11-18 12:38:06 +01:00
scb.h Improve wording 2015-02-16 10:17:58 +01:00
sha256.c cc2538: ccm: Make it possible to use the interrupt 2015-06-02 21:41:07 +02:00
sha256.h cc2538: Add crypto drivers and examples for AES-CCM and SHA-256 2015-06-02 21:41:06 +02:00
smwdthrosc.h
soc-adc.h cc2538: Add adc driver and example 2013-12-06 22:07:45 +01:00
spi.c cc2538: Allow for configuration of processor speed 2015-05-19 18:55:55 +02:00
ssi.h CC2538: added support for SSI1 2015-05-18 10:02:55 +02:00
sys-ctrl.c cc2538: sys-ctrl: Provide last reset cause 2016-06-11 23:23:38 +02:00
sys-ctrl.h cc2538: sys-ctrl: Provide last reset cause 2016-06-11 23:23:38 +02:00
systick.h
uart1.h cc2538: uart: Make it possible to use several UARTs simultaneously 2014-04-17 18:53:44 +02:00
uart.c cc2538: uart: Make uart_isr() static 2015-06-05 21:50:49 +02:00
uart.h CC2538: Add hardware flow control (RTS/CTS) support on UART1. 2014-06-03 12:38:24 -04:00
udma.c cc2538: Fix GCC 5 warning 2016-01-09 15:43:20 +01:00
udma.h Fix doxygen warning in the CC2538 uDMA driver's header 2015-02-16 10:17:57 +01:00
usb-regs.h
vdd3-sensor.c Add CC2538 VDD sensor driver 2015-05-12 23:42:19 +01:00
vdd3-sensor.h Add CC2538 VDD sensor driver 2015-05-12 23:42:19 +01:00
watchdog.c Remove CC2530 and CC2538 dummy watchdog_stop() 2015-06-01 15:24:14 +01:00