AnsweredAssumed Answered

I2C Multimaster in FRDM-K64F with KDS and Processor Expert

Question asked by Antonio Quevedo on Jul 21, 2015
Latest reply on Jul 24, 2015 by Antonio Quevedo

Hello,

 

I am working on a project for a FRDM-K64F board, using KDS 3.0 and Processor Expert (bare metal, no RTOS). I am using Processor Expert and added a Generic I2C component, that works on top of a I2C LDD component. I have enabled interrupts, and I have configured PE generic I2C to generate code for the OnError event. The peripheral is working on master/slave mode, since I want to place the board into a multimaster I2C bus.

 

I have assembled a test jig, using a 24LC08 EEPROM IC, and a switch to put SDA line to GND. I can test if the bus is available reading the I2Cx_S register and checking the BUSY bit. However, I did not think of a way to test the simultaneous START signal from 2 masters, and to check arbitration loss. I also do not know if when one Kinetis I2C peripheral device loses arbitration, if it switches automatically to slave mode and if it responds as a slave when the ID sent by the other master matches the slave ID of the device that just lost arbitration.

 

I would like to know if someone has some example code working on the constraints presented above.

 

Thanks in advance.

Outcomes