Hi Joe
Code at line 296 of CC2420ReceiveP.nc is checking the value (correctness) of
CRC. Also the code at the lines 171-173 of CC2420ActiveMessageP.nc (which I
couldn't find on TinyOS 2.0.2 that I am working on) is doing the same thing.
However to disable the CRC, we are not bothered about checking the CRC value,
instead we are concerned where the CRC is written to the frame. AUTOCRC or CRC
on CC2420 is written at the 5th bit position of MDMCTRL0, one of the registers
on CC2420.
This writing process in the code can be found at the 442nd line of
CC2420ControlP.nc. So, to disable the AUTOCRC, just comment out the 448th line (
1 << CC2420_MDMCTRL0_AUTOCRC ). As per the datasheet of CC2420, the Hardware
ACKs don’t
work on disabling the AUTOCRC which means that you may also comment out the
two lines dealing with AUTOACK that are just below the 448th line or you can
leave them as they are.
Regards
Dinesh
Date: Thu, 2 Jul 2009 11:29:23 -0700 (PDT)
From: Joe Green <[email protected]>
Subject: [Tinyos-help] Coding for CRC checking (CC2420)
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
Hi,
I've read the datasheet for the CC2420 chip and
it appears that on the receiver side there is one bit signifying the CRC
pass/fail. I am trying to find where this bit is checked to disable the CRC
checking. So far, I found two instances that seem to check the CRC.
In lines 171-173 of CC2420ActiveMessageP.nc, the code is:
if(!(call CC2420PacketBody.getMetadata(msg))->crc) {
return msg;
}
Line 296 of CC2420ReceiveP.nc also seems to check the CRC:
if ( ( buf[ rxFrameLength ] >> 7 ) && rx_buf ) {
Can anyone explain what these two sets of coding do, and let me know if there
are any other places the crc bit is checked?
Thanks,
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090702/a53b7246/attachment-0001.htm
Looking for local information? Find it on Yahoo! Local
http://in.local.yahoo.com/_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help