I2C- MSP430F169 Multimaster

Gast #238858
Lesenswert?
• ▲
▼
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 :)
Gast #238859
Lesenswert?
• ▲
▼
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...
Gast #238860
Lesenswert?
• ▲
▼
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.

Antwort schreiben

Hinweis: der ursprüngliche Beitrag ist mehr als 6 Monate alt. Bitte hier nur auf die ursprüngliche Frage antworten, für neue Fragen einen neuen Beitrag erstellen.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.