This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why nRF52832 output wrong TWI wave?

Hi,

I was trying to communicate with an I2C device, which's address is 0x7C

But I always got NRF_DRV_TWI_EVT_ADDRESS_NACK event, so I took a check on the TWI wave:

Looks like the signal on SDA is correct but the SCK signal is 1 cycle later than normal, that make 0x7C as 0x80.

Why this could happen? is it an issue missed in errata?

Note: I noticed there's DMA issue in errata so I choosed TWI instead of TWIM

Parents Reply
  • I see. Then this is probably just a confusion about the read/write bit. The lowest bit is the read write bit (1 = read), so when you want to write to your device (address 0x7C) you will see 0xF8. When you want to read from it you will see 0xF9. That is according to I2C spec.

    A typical mistake is to think that the address includes the r/w bit. If that is the case here, you should instead use the address 0x31 (which is 0x7C >> 1).

Children
Related