SCPA063 March   2023 PCA9306

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2General Checks for Dealing With NACKs
    1. 2.1 NACKs
    2. 2.2 Check the Schematic
    3. 2.3 Double Check SDA and SCL Between the Controller and Target
    4. 2.4 RESET Properly Biased
    5. 2.5 Device is Soldered Properly
  5. 3Scopeshots
    1. 3.1 Why use Oscilloscopes for Debugging?
    2. 3.2 Setting up the Oscilloscope
    3. 3.3 Verify the I2C Address When a NACK is Received
    4. 3.4 Validate Start and Stop Conditions
    5. 3.5 Check the Byte Format
    6. 3.6 Are Rise Times Within I2C Standard?
    7. 3.7 Are the Sent Command Bytes Valid?
  6. 4I2C Switches
    1. 4.1 Stop Conditions for TI I2C Switches
  7. 5I2C Buffers
    1. 5.1 VoL versus ViLc of the Buffer
    2. 5.2 VoL of the Buffer Exceeds the ViL of the I2C Target
    3. 5.3 Static Offset of Buffers Cannot Connect to Other Static Offsets
  8. 6Checklists
  9. 7Conclusion

Verify the I2C Address When a NACK is Received

If NACKs are received from a device that the design is attempting to communicate with, sending the wrong address can cause these errors.

Communicating with a device via I2C requires sending out the address of the specific device being communicated with after a start condition is initiated. If NACKs are received from a device that the design is attempting to communicate with, these NACKs can be a result of the wrong address being sent to the device. To verify that the correct address is being sent, use the oscilloscope window to view the individual bits being sent to the device after a start condition is initiated. Use clock pulses on the SCL line to mark the individual bits of a single frame (remember, there should be 8 clock pulses between each ACK or NACK bit). NACKs are created when the wrong target address is sent to the device that you are trying to communicate with, which is why verifying that the controller is sending out the correct address is important.

Once the oscilloscope is used to determine the target address that is being sent out, next check the data sheet of the I2C device for the target address value. For I2C communications to be successful, the target address that is being sent out must match the address in the data sheet of the target. If a target is sending back NACKs for every I2C frame that is sent, these NACKs can be because the sent target address does not match the actual address of the target (which is always specified in the data sheet of the target device).

Some I2C devices can also have a hardware-addressable target address that allows for the target address to be changed by the user. If this is the case, check these hardware addressable target bits and make sure that these bits are correctly biased to either a logic high or a logic low value. If these hardware-addressable target bits are left floating, the target address can easily be changed by electrical noise in the system. If the target address is changed to a value that is different than the address being sent by the controller, the target sends back a NACK.