10 years, 5 months ago.

I2C monitor mode on the 1768

In the doc I found this:

<i>Enhancements include multiple address recognition and monitor mode. </i>

I am looking for example code that will put the device in Monitor mode. I want to put the device in Monitor Mode, and print the values my device receives out the USB port.

I would appreciate a pointer to such an example if anybody knows of one please...

Cheers, Jvh

To the mbed folks,

Do you have an example of how to configure the chip to read I2c traffic in Monitor mode ? I have tried to get it working from reading the user manual and from trying to get code I downloaded. I have been unsuccessful. I am not new to programming embedded devices.

I have : I2C_Init(LPC_I2C1,100000); I2C_MonitorModeCmd(LPC_I2C1, ENABLE); I2C_MonitorModeConfig(LPC_I2C1, I2C_MONITOR_CFG_MATCHALL, ENABLE); NVIC_EnableIRQ(I2C1_IRQn);

/* Check SI flag ready */ if ((LPC_I2C1->I2CONSET & I2C_I2CONSET_SI) ){ if ((I2C_I2CONSET_SI) ){ pc.printf("LPC_I2C1->I2CONSET & I2C_I2CONSET_SI is true \r\n"); LPC_I2C1->I2CONCLR = 0x08; myByte = I2C_MonitorGetDatabuffer(LPC_I2C1); pc.printf("dataBuff has %x in it , and the count is %x \n\r",myByte, count++); }

This is from 'lpc17xx_i2c.c' ... can you show me a working example using this library of functions please ...

Jvh

posted by John Van Hook 12 Jun 2014

To the mbed folks,

Do you have an example of how to configure the chip to read I2c traffic in Monitor mode ? I have tried to get it working from reading the user manual and from trying to get code I downloaded. I have been unsuccessful. I am not new to programming embedded devices.

I have : I2C_Init(LPC_I2C1,100000); I2C_MonitorModeCmd(LPC_I2C1, ENABLE); I2C_MonitorModeConfig(LPC_I2C1, I2C_MONITOR_CFG_MATCHALL, ENABLE); NVIC_EnableIRQ(I2C1_IRQn);

/* Check SI flag ready */

if ((LPC_I2C1->I2CONSET & I2C_I2CONSET_SI) ){ if ((I2C_I2CONSET_SI) ){ pc.printf("LPC_I2C1->I2CONSET & I2C_I2CONSET_SI is true \r\n"); LPC_I2C1->I2CONCLR = 0x08; myByte = I2C_MonitorGetDatabuffer(LPC_I2C1); pc.printf("dataBuff has %x in it , and the count is %x \n\r",myByte, count++); }

This is from 'lpc17xx_i2c.c' ... can you show me a working example using this library of functions please ...

Jvh

posted by John Van Hook 12 Jun 2014
Be the first to answer this question.