C no reason for bus error flag on ATxmega128A1

NorthTommy

Neues Mitglied
20. Feb. 2014
1
0
0
Sprachen
TWI on ATxmega128A1 as master signals "bus error" in status flag, although the bus looks fine. After writing the address (read slave) I receive an ACK from the client. I can verify this on oszilloscope. Unfortunately the chip sets the "bus error" flag in status register on raising the WIF interrupt. According to datasheet the chip cannot find multiple of 9 bits between start and stop condition for setting the error. But there is neither a stop nor a repeated start condition on oszilloscope. I simply expect the slave to answer on masters clock, but the atmel signals error. I cannot find why. The parallel I2C sniffer (beagle) cannot find a problem as well, except that the remaining data on bus is missing (because of the error flag set and my software stops the transaction). Did anyone found a similar behavior?
Thx
 
Hello,

I had a problem with TWI a long time ago, too. In my case I simply forgot to set a start condition (or stop? Doesn't know anymore).
Some other sort of problem I had with using SPI. Code hangs after sending the first byte (ready flag never gets set). I forgot to set MOSI as output.

Doesn't know if this helps you to locate your problem.
At least it was a try :)


p.s.: Why an english question in a german community? 0.o
I have no problem with that anyway, at least if you have no problem with my english ;)
 

Über uns

  • Makerconnect ist ein Forum, welches wir ausschließlich für einen Gedankenaustausch und als Diskussionsplattform für Interessierte bereitstellen, welche sich privat, durch das Studium oder beruflich mit Mikrocontroller- und Kleinstrechnersystemen beschäftigen wollen oder müssen ;-)
  • Dirk
  • Du bist noch kein Mitglied in unserer freundlichen Community? Werde Teil von uns und registriere dich in unserem Forum.
  •  Registriere dich

User Menu

 Kaffeezeit

  • Wir arbeiten hart daran sicherzustellen, dass unser Forum permanent online und schnell erreichbar ist, unsere Forensoftware auf dem aktuellsten Stand ist und der Server regelmäßig gewartet wird. Auch die Themen Datensicherheit und Datenschutz sind uns wichtig und hier sind wir auch ständig aktiv. Alles in allem, sorgen wir uns darum, dass alles Drumherum stimmt :-)

    Dir gefällt das Forum und unsere Arbeit und du möchtest uns unterstützen? Unterstütze uns durch deine Premium-Mitgliedschaft!
    Wir freuen uns auch über eine Spende für unsere Kaffeekasse :-)
    Vielen Dank! :ciao:


     Spende uns! (Paypal)