xMega as i2c slave: TWI slave interrupts

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, all!

According to datasheet "8-bit AVR XMEGA A Microcontroller: XMEGA A MANUAL Preliminary" (8077H-AVR-12/09) there is no interrupt between Slave Address Interrupt and Slave Data Interrupt when slave transmitting data packets (page 215). But in sample code "AVR1308: Using the XMEGA TWI" in file twi_slave_driver.c in function TWI_Slave_AddressMatchHandler() written: "Send ACK, wait for data interrupt." and no data sent after Slave Address Interrupt and before Slave Data Interrupt.

When the slave have to send the first data byte in Slave Transmit Mode:
1) after the Slave Address Interrupt (according to datasheet) and before the first Slave Data Interrupt or
2) after the Slave Address Interrupt slave have to wait for Slave Data Interrupt (according to AVR1308 sample) and then send the data?

Ilya

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

O-ops! I misread datasheet %-)

There is no problem. After Slave Adderss Interrupt with R-bit there is Slave Data Interrupt.

Ilya