The example code (http://www.ti.com/lit/zip/sbac254) for the ASS131M0x family contains an error in the CRC function which causes the function to generate incorrect CRCs.
The calculateCRC() function transposes the values for the CCITT and ANSI binary polynomials, using the CCITT value (0x1021) when the manifest constant CRC_ANSI is defined, and the ANSI value (0x8005) when the manifest constant CRC_CCITT is defined.
#ifdef CRC_CCITT
/* CCITT CRC polynomial = x^16 + x^12 + x^5 + 1 */
const uint16_t poly = 0x8005;
#endif
#ifdef CRC_ANSI
/* ANSI CRC polynomial = x^16 + x^15 + x^2 + 1 */
const uint16_t poly = 0x1021;
#endif
The ADS131M04 datasheet defines the CRC binary polynomials in Table 9 in section 8.3.13:
CCITT CRC binary polynomial: 0001 0000 0010 0001 (0x1021)
ANSI CRC binary polynomial: 1000 0000 0000 0101 (0x8005)
-Nick