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.

ADS7138: CRC module

Part Number: ADS7138
Other Parts Discussed in Thread: ADS7066

I'm writing a driver for ADS7138. I still don't have the HW and would like to speed up the development time, so I cannot do any experiments that would help me to understand the device at this point.
I have few questions regarding the CRC module because I don't know if I understand it correctly:

1) Power up CRC - does it mean that the device computes CRC on expected default values and asserts a failure (CRC_ERR_FUSE) if it does not match preprogrammed value? 

2) Writing into ADS7138 - does it mean that whenever I write some data and ADS7138 CRC is enabled, I need to append CRC of the byte being written? So when I write one byte into GENERAL_CFG I need to send actually two bytes via I2C (GENERAL_CFG value plus its CRC)? 

3) Reading data from ADS7138. The general information in the datasheet says that CRC is also for output data. I don't see any config bit that enables output CRC. And if this is enabled, does it mean that reading from RECENT_CH0_LSB will return RECENT_CH0_LSB value + its CRC byte? Could I use the burst register read even when the CRC is activated?

Thank you,

  • Hello,

    1. the CRC_ERR_FUSE helps to confirm that CRC was set up correctly, or enabled correctly. This is different from the CRC_ERR_IN register, which indicated if there was a an error in the incoming communication when using CRC. Meaning that the value of the incoming CRC was not the expected value. 

    2. if CRC is enabled, ALL incoming communication will need to have the CRC appended. your understanding is correct. 

    3. To enable the CRC module, set the CRC_EN bit in the GENERAL_CFG register. Table 3 in the datasheet shows how a CRC error can be detected when configuring the ADS7138. Correct, ALL output data from the ADC will also have the CRC appended to it. 

    The following document speaks for to CRC module, it is in reference to the ADS7066, but the functionality and behavior is the same as the ADS7138. 

    Implementation of CRC for ADS7066



  • Hello Cynthia,

    thank you for additional information. I still don't understand the purpose of CRC_ERR_FUSE. Which CRC setup is checked? Should I check this bit after setting CRC_EN?

    Also I don't know how the device can be used with CRC enabled in the continuous reading mode. The CRC is appended as the last byte in the frame, but how the device could know that the last byte has been transmitted when master is not defining the number of bytes and the end of transfer is indicated by NAK from master as per the I2C protocol. Could I use the CRC module when I want to read the channel register as a continuous block of registers?

    Thank you,


  • Hi Vlastimil,

    The CRC_ERR_FUSE bit is useful for detecting any problems in the power-up of the ADC. This is a read-only bit and it is evaluated by the ADC during power-up. If the CRC_ERR_FUSE bit is 1b, the device needs to be reset either by power-cycling AVDD or using the RST bit.

    The ADS7138 appends an 8-bit CRC code to every 8-bit I2C data launched by the ADC. Hence, the host will receive a CRC code for every data byte received from the ADS7138. This is why the ADS7138 does not need to know the length of the I2C frame.

    You can use CRC module for reading registers and also ADC conversion result. The ADS7138 will append an 8-bit CRC code to every 8-bit output data.




  • Hi Rahul,

    thank you this makes sense. The CRC is now clear. I have one additional question that came up to my mind when I was reading your response. When I read the ADC result, I could just set Channel ID in manual mode or set the auto sequence and then read the data using simple read frame like this?

    I mean I don't need to specify the result register (e.g. 0xA0 for channel 0) and then read it result?

  • Hi Vlastimil,

    You are right. You can read ADC data either in manual mode (by setting required channel ID) or in auto-sequence mode directly as shown in the image in your post. It is not necessary to read any registers for reading ADC conversion result.



  • Thank you very much for explanation.