I've been experimenting with I2C Monitor Mode on a LPC1769 based board
using code derived from the LPC17xx code bundle and have encountered problem
with monitoring read transactions (pure writes seem fine).
Performing a read from a PCF8563 RTC on another board, the following I2C events
are reported
EVT(Id, Time, I2STAT, I2CDAT, I2DATA_BUFFER)
EVT(1,403713,0x60,0xA2,0xA2) // Write to device 0xA2
EVT(2,403717,0x80,0x01,0x01) // Select register 1
EVT(3,403719,0x00,0x04,0x01) // Repeat start (write -> read)
EVT(4,403724,0xA8,0xA3,0xA3) // Read from device 0xA2
EVT(5,403728,0xC0,0xA0,0xA0) // Read data (wrong value)
The last event (the data read) seems to be returning the wrong value although it
can change between repeat reads of the same location.
I asked NXP support if there was any known problem in this area and they said
that 'This is an unknown issue.'. However, doing a web search for this
problem does indicate that a few others have seen this.
Before I spend much more time on this issue, I wanted to ask if anyone else has
add success using I2C Monitor Mode in this way, or if others have seen this
issue (and maybe resolved it?).
Thanks for any help,
Andy
LPC17xx I2C Monitor Mode
Started by ●August 17, 2012
Reply by ●August 26, 20122012-08-26
--- In l..., "grapevinetech" wrote:
>
> I've been experimenting with I2C Monitor Mode on a LPC1769 based board using code derived from the LPC17xx code bundle and have encountered problem with monitoring read transactions (pure writes seem fine).
>
> Performing a read from a PCF8563 RTC on another board, the following I2C events are reported
>
> EVT(Id, Time, I2STAT, I2CDAT, I2DATA_BUFFER)
> EVT(1,403713,0x60,0xA2,0xA2) // Write to device 0xA2
> EVT(2,403717,0x80,0x01,0x01) // Select register 1
> EVT(3,403719,0x00,0x04,0x01) // Repeat start (write -> read)
> EVT(4,403724,0xA8,0xA3,0xA3) // Read from device 0xA2
> EVT(5,403728,0xC0,0xA0,0xA0) // Read data (wrong value)
>
> The last event (the data read) seems to be returning the wrong value although it can change between repeat reads of the same location.
>
> I asked NXP support if there was any known problem in this area and they said that 'This is an unknown issue.'. However, doing a web search for this problem does indicate that a few others have seen this.
>
> Before I spend much more time on this issue, I wanted to ask if anyone else has add success using I2C Monitor Mode in this way, or if others have seen this issue (and maybe resolved it?).
>
> Thanks for any help,
>
> Andy
>
I don't think you are interpreting the I2C protocol correctly. From the data you posted it looks like a valid, normally completed, "read byte" transaction (i.e. read a single byte).
I'll suggest you look at a file I posted some time ago...
I2C_Transaction_Summary.pdf
located in ...
http://tech.groups.yahoo.com/group/lpc2000/files/I2C/
Look at a SLAVE read byte transaction.
TC
>
> I've been experimenting with I2C Monitor Mode on a LPC1769 based board using code derived from the LPC17xx code bundle and have encountered problem with monitoring read transactions (pure writes seem fine).
>
> Performing a read from a PCF8563 RTC on another board, the following I2C events are reported
>
> EVT(Id, Time, I2STAT, I2CDAT, I2DATA_BUFFER)
> EVT(1,403713,0x60,0xA2,0xA2) // Write to device 0xA2
> EVT(2,403717,0x80,0x01,0x01) // Select register 1
> EVT(3,403719,0x00,0x04,0x01) // Repeat start (write -> read)
> EVT(4,403724,0xA8,0xA3,0xA3) // Read from device 0xA2
> EVT(5,403728,0xC0,0xA0,0xA0) // Read data (wrong value)
>
> The last event (the data read) seems to be returning the wrong value although it can change between repeat reads of the same location.
>
> I asked NXP support if there was any known problem in this area and they said that 'This is an unknown issue.'. However, doing a web search for this problem does indicate that a few others have seen this.
>
> Before I spend much more time on this issue, I wanted to ask if anyone else has add success using I2C Monitor Mode in this way, or if others have seen this issue (and maybe resolved it?).
>
> Thanks for any help,
>
> Andy
>
I don't think you are interpreting the I2C protocol correctly. From the data you posted it looks like a valid, normally completed, "read byte" transaction (i.e. read a single byte).
I'll suggest you look at a file I posted some time ago...
I2C_Transaction_Summary.pdf
located in ...
http://tech.groups.yahoo.com/group/lpc2000/files/I2C/
Look at a SLAVE read byte transaction.
TC