beautypg.com

3 automatic fcs generation, 4 automatic fcs check – Rainbow Electronics AT86RF231 User Manual

Page 86

background image

86

8111A–AVR–05/08

AT86RF231

8.2.3

Automatic FCS generation

The automatic FCS generation is performed with register bit TX_AUTO_CRC_ON = 1 (reset
value). This allows the AT86RF231 to compute the FCS autonomously. For a frame with a frame
length specified as N (3

≤ N ≤ 127), the FCS is calculated on the first N-2 octets in the Frame

Buffer, and the resulting FCS field is transmitted in place of the last two octets from the Frame
Buffer.

If the radio transceivers automatic FCS generation is enabled, the Frame Buffer write access
can be stopped right after MAC payload. There is no need to write FCS dummy bytes.

In RX_AACK mode, when a received frame needs to be acknowledged, the FCS of the ACK
fr am e i s alw ay s au to m at i c a lly ge n er ate d by t he A T 86 R F 2 31 , i n de p en de n t of th e
TX_AUTO_CRC_ON setting.

Example:

A frame transmission of length five with TX_AUTO_CRC_ON set, is started with a Frame Buffer
write access of five bytes (the last two bytes can be omitted). The first three bytes are used for
FCS generation; the last two bytes are replaced by the internally calculated FCS.

8.2.4

Automatic FCS check

An automatic FCS check is applied on each received frame with a frame length N

≥ 2. Register

bit RX_CRC_VALID (register 0x06, PHY_RSSI) is set if the FCS of a received frame is valid.
The register bit is updated when issuing interrupt IRQ_3 (TRX_END) and remains valid until the
next TRX_END interrupt caused by a new frame reception.

In RX_AACK mode, if FCS of the received frame is not valid, the radio transceiver rejects the
frame and the TRX_END interrupt is not issued.

In TX_ARET mode, the FCS and the sequence number of an ACK is automatically checked. If
one of these is not correct, the ACK is not accepted.