This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2520 auto ack mode

Other Parts Discussed in Thread: CC2591, CC2520

Hi, I'm using CC2520+CC2591 chipset with AUTOCRC enabled in FRMCTRL0 register, so the two FCS bytes in the rx fifo are replaced with RSSI+CRC OK bit+Correlation value as written in datasheet page 80.

I have a problem enabling autoack in FRMCTRL0 register: I receive correctly the ACK frame with correct length (5 bytes), FCF and sequence number but the CRC_OK bit is always set to 0, then it seems that the ack frame should be discarded. How could it be possible?

thank's

Stefano

  • Hi,
    are you sure AUTOCRC field in FRMCTRL0 register is not set to '0' when the ACK is received?
    The ACK frame should be received by the node and FCS is correct, and the receiver node has auto-crc setting, then the most significant bit of the first byte of the FCS frame returns the result of the FCS computation as done by the HW.
    However, if AUTOCRC is set to 0, then the two FCS bytes contain the actual FCS field OTA and the CRC computation must be done in SW.

    Thanks,
    TheDarkSide
  • Hi TheDarkSide, thank you for your prompt answer.
    With AUTOCRC = 1 you wrote the FCS computation result is the MSBit of the first byte of the FCS field, but in the datasheet is the MSBit in the second one (section 20.3.4) is it an error in the ds?

    I'm using your basicRf source code ported on my microcontroller (not TI), so the AUTOCRC is set only once during the init routine. Also I see the two FCS bytes changing even keeping the seq number unchanged (this should produce always the same value of the FCS if AUTOCRC=0)

    regards
    Stefano
  • Hi again,
    I did some more investigations...AUTOCRC is always set to 1.
    Receiving a "standard" frame (not automatically sent by the chip) the two FCS (rssi+crc_ok bit+correlation) bytes are ok, but receiving the automatically generated ack, these two bytes are swapped in the rxfifo
    very strange!

    Stefano
  • Hi Stefano,
    my mistake on the byte which carries the CRC_OK bit. It is the second one.
    I checked in the TI-MAC code and the way we check the CRC is the same whether that was a plain 802.15.4 data frame or a MAC ACK frame. It is very unlikely that there was an issue like that, because that would mean we wouldn't be able to recognize any acknowledgment.

    One thing I want to make sure is whether you are retrieving the right data for the MAC ACK.
    MACK ACK is a special frame, only 5 bytes + 1 byte of PHY header (which carries the length of the PHY payload, ie 5 bytes).
    So your array should contain 6 bytes in the fifo, and byte 5 and 6 should be respectively RSSI and CRC_OK+correlation.

    Please check out for your reference the code in Components\mac\low_level\srf04\mac_rx.c

    Thanks,
    TheDarkSide
  • Hi TheDarkSide,
    as we can expected, it was an error of mine due to the different endianess of my microcontroller...problem is solved,

    thank you for your time and efforts
    Stefano