Closed GoogleCodeExporter closed 9 years ago
Original comment by philip.l...@gmail.com
on 29 Nov 2011 at 6:12
RF230 driver is affected with the same problem.
For example there are cases when changing channel fails if at the same time
some packet is receive.
Original comment by andres.v...@smartdustsolutions.com
on 2 Dec 2011 at 1:24
Thanks for the detailed error report!
Yes, the Atmega128RFA1 radio driver is affected. However, the proposed solution
is not correct. We take extra care not to read or modify the command and state
and other variables in interrupt context. So you CANNOT check do the check in
your TRX24_RX_END_vect interrupt vector (unless we protect all cmd updates with
atomic, but we do not want to, since tasklets will do that for us).
The real problem is in the handling of the interrupt code, in particular in
line 607:
if( irq & IRQ_RX_END )
{
...
cmd = CMD_DOWNLOAD;
}
It should not do that, it should check if CMD is NONE, or some other things and
only then should it proceed to download stuff. Note, that the RF230 drivcer is
NOT affected with this behavior, there we take pain to check the CMD.
Can you reproduce the error on the RF230 (or RF212)?
My proposed change is to do this:
1) if( cmd == NONE && (irq & IRQ_RX_END) != 0 )
2) do some safety checking for if( irq & IRQ_TX_END ) case as well
3) reorganize the three ifs, so that we check first for TX_END, then for
RX_START and then for RX_END. I did similar thing for RF230, so you could send
a packet and receive another one handle the interrupt after all these three
events have occurred.
Here is a link to my proposed changes. Can someone check it?
Miklos
Original comment by mmar...@gmail.com
on 13 Mar 2012 at 9:47
The link is here:
https://github.com/mmaroti/tinyos/commit/05ea35ff59e8dfaff738218042551f75e5bef31
3
Original comment by mmar...@gmail.com
on 13 Mar 2012 at 9:48
> Can you reproduce the error on the RF230 (or RF212)?
I have not noticed such a behavior with RF230.
Original comment by andres.v...@smartdustsolutions.com
on 14 Mar 2012 at 6:01
Fixed.
Original comment by mmar...@gmail.com
on 29 Mar 2012 at 2:38
Can any one provide solution for RF230 in file RF230DriverLayerP.nc
Original comment by rdprav...@iith.ac.in
on 20 Apr 2012 at 1:55
This issue did not affect the RF230 driver.
Original comment by mmar...@gmail.com
on 20 Apr 2012 at 3:33
Original issue reported on code.google.com by
andres.v...@smartdustsolutions.com
on 28 Nov 2011 at 9:16Attachments: