Hello, We try the example code of Texas (slaa208) : The program supports the communication between a MSP430F169 and an EEPROM 24AA65. And it works fine. But now we try the same example in two MSP430F169 and one EEPROM 24AA65. And we have bigs problems...!!!!!???? When a collision occurs, the SDA line remains blocked forever "low" !!! Which kind of software adaptation must we make to solve this problem ? Because Texas don't give any example with a similar configuration (2 masters this one or more shared slaves) ! Thanks for your help :)
do you mean, that you have 2 masters (the msp430f169) ? i2c allows just one master at the bus! if you would use 2 masters, you should use an extra portpin between the msp`s, so you can put it maybe high if one is operating on the bus. if the other msp would operate on the bus, he should look at the pin. if it is high, he would not be allowed to write to se bus. if it is low, he should set it high, so that the other msp would not be allowed to write...
The Specification of the I2C bus allows multible masters and a device compliant to the Philips I2C Spec must have a mult-imaster functionality. Accordant to the device's datasheet it's able to hadle it. But it seems it is not implemented in the software. First it is necessary to understand the multi-master function (esp. arbitration)as defined by Pilips therefore see I2C Spec http://www.mikrocontroller.net/forum/read-1-238638.html#239729 A detailed description of I2C functionality of the device can be found here: www-s.ti.com/sc/techlit/SLAU049 and these are bits that have to be set/checked to detect a loss of arbitration. (just as a starting point, I did not check the whole documentation) I2CIE, I2C Interrupt Enable Register ALIE I2CIFG, I2C Interrupt Flag Register ALIFG U0CTL, USART0 Control Register-I2C Mode LISTEN (might be necessary to be able to listen to the SDA line) If a loss of arbitration is detected, the device must release the bus and be set into slave mode until the bus is free again.
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.