I2C-bus Status Register Descriptions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C-bus Status Register Descriptions

1,777 Views
andrew_stephen
Contributor I

I am working with the MSP430FR2311 that has the SC18IM700 chip. I was writing tests for I2C master and slave communication between two of the same board. One is programmed as a master and the other as a slave. I was getting unexpected behavior when trying to test the I2CSTAT register values. Specifically the I2C_NACK_ON_DATA as seen below.

pastedImage_1.png

When sending a write command to the chip and receiving a nack after the address is sent it is being registered as a I2C_NACK_ON_DATA. I would think this should be considered a I2C_NACK_ON_ADDRESS instead. Is my assumption correct? I wasn't able to find proper documentation explaining when these different statuses are supposed to be set. If you could provide a better description of each status or link me to somewhere that describes this that would be best.

Labels (1)
0 Kudos
4 Replies

1,589 Views
andrew_stephen
Contributor I

Hi Tomas,

I found out that there was a bug with my slave device that was causing this issue to occur. I was able to resolve the issue after fixing this bug. Thank you for your help on this.

Thanks,

Andrew

0 Kudos

1,589 Views
andrew_stephen
Contributor I

Hi Tomas,

Below is an image showing the NACK on address for a write command. When I check the I2C_STAT register it is set to I2C_NACK_ON_DATA. If I do a read command and the NACK occurs here it is seen as a I2C_NACK_ON_ADDRESS. It should be a I2C_NACK_ON_ADDRESS in both cases. That is what I think.

pastedImage_2.png

Thanks,

Andrew

0 Kudos

1,589 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Andrew,

I have looked into this and the device seems to respond properly. I just send an I2C address of the non-existing device and read the I2CStat, I read 0xF1 which is I2C_NACK_ON_ADRRESS. 

If you wait for a little then read back I2CStat register, would it still be 0xF2? Can you try to run the same test right after power up without doing anything before the test, would you still read 0xF2? What is the UART sequence you did send?

Best regards,

Tomas

 

0 Kudos

1,589 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Andrew,

This is a pretty old device and I do not have any other documents besides the data sheet.

However, I will try to find a board to duplicate the issue. Could you please capture the I2C trace of the NACK of address with a scope and post it here? I want to make I can duplicate the same sequence.

Best regards,

Tomas

0 Kudos