boards: Fix CC2420 RXFIFO overflow#1304
Conversation
|
Compilation fails on WSN430-v1.4. Can you see into it? |
|
forgot to include header and define for |
|
Travis is happy again. |
|
@thomaseichinger Please exceuse me for the delay in my reaction, I've been busy with exam preparations last week. I should be more active again as of now. |
boards/telosb/driver_cc2420.c
Outdated
There was a problem hiding this comment.
I think this is only true if both interrupts are pending. Shouldn't it be rather:
if (((P1IN & CC2420_FIFOP_PIN) != 0) && (P1IFG & CC2420_GIO0_PIN) != 0)
-> GIO0 goes low, while FIFOP is still high?
|
TL;DR: In the timing chart below two cases are described
@rousselk Do you agree with our argumentation? |
|
@thomaseichinger To sum up: yes. However, I don't think this will be much of a problem: we will receive corrupted data ONLY if we read the RXFIFO bytes slower than the transceiver receives and writes them into its buffer; however, 802.15.4 is a (relatively) slow protocol (250 kbit/s, which mean each byte is received from the medium in 32 microseconds); since the MSP430 UART drives the SPI communication with the transceiver at half the MCU speed, that is: at least 1 MHz on TelosB and circa 4 MHz on Z1, we can quite safely assume that reading bytes from CC2420 will be done faster that the transceiver receives them. 2). This is the trouble-free case where we can read all the incoming packet before the next one begins to arrive. For the reasons cited hereabove, I think we will almost always be in this situation. |
|
So: if @OlegHahm acks, I can merge this PR, maybe after a squash. |
|
ACK - merge or squash, I'll leave it to you, @thomaseichinger. |
TelosB, wsn430-v14, Z1
|
squashed and go |
boards: harmonise cc2420 isr
|
Nice! :) |
Attempts to implement CC2420 ISR to handle RXFIFO overflow compliant to datasheet.
Contains changes for:
fixes #315