osd-contiki/cpu/cc2538
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
..
dev Don't flush the CC2538 RF RX FIFO unconditionally 2016-07-17 00:24:47 +01:00
usb cc2538: examples: Fix build warnings 2015-06-02 01:38:11 +02:00
cc2538.lds cc2538: Add configuration for firmware location 2016-06-19 23:12:02 +02:00
cfs-coffee-arch.c cc2538: Add support for Coffee 2015-11-19 01:22:58 +01:00
cfs-coffee-arch.h cc2538: coffee: Add default micro-log configuration 2016-05-30 23:05:14 +02:00
clock.c cc2538: Allow for configuration of processor speed 2015-05-19 18:55:55 +02:00
cpu.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
cpu.h Re-structure CC2538 doxygen module hierarchy 2015-02-16 10:17:58 +01:00
dbg.c cc2538: uart: Make it possible to use several UARTs simultaneously 2014-04-17 18:53:44 +02:00
dbg.h Improve wording 2015-02-16 10:17:58 +01:00
debug-uart.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
ieee-addr.c Improve documentation for the CC2538 IEEE address re-ordering 2014-06-06 18:33:28 +01:00
ieee-addr.h Make the CC2538 secondary IEEE address location configurable 2014-06-06 18:15:07 +01:00
lpm.c cc2538: pwm: Automatically disable PM1+ if running 2015-12-13 02:39:55 +01:00
lpm.h cc2538: lpm: Fix build for LPM_CONF_ENABLE == 0 2014-01-28 20:21:06 +01:00
Makefile.cc2538 cc2538: Provide SoC information 2016-06-11 23:23:38 +02:00
mtarch.h A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
reg.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rtimer-arch.c cc2538: lpm: Fix RTIMER_NOW() upon wake-up 2013-12-05 20:23:29 +01:00
rtimer-arch.h Macros for TSCH 2016-03-07 17:25:40 +01:00
slip-arch.c cc2538: uart: Make it possible to use several UARTs simultaneously 2014-04-17 18:53:44 +02:00
soc.c cc2538: Provide SoC information 2016-06-11 23:23:38 +02:00
soc.h cc2538: Provide SoC information 2016-06-11 23:23:38 +02:00
spi-arch.h CC2538: added support for SSI1 2015-05-18 10:02:55 +02:00
startup-gcc.c cc2538: Fix stack alignment 2015-12-12 22:33:05 +01:00