XMEGA128A1 TWI

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

Hi, just been trying to use the TWI on this device and noticed there is a discrepancy between the definition in iox128a1.h and the XMega182A1 data sheet. the IO indexes are out by 1 after the base address. It looks like address (base) + 1 is not accounted for in the datasheet and the struct is then misaligned as it does not take this into account.

I might be wrong but it certainly doesn't look right to me and the IO View window matches exactly that.

Thanks.

John.

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

Looks like the data sheet is wrong, I tried to write to bits that couldn't be written to within some of the addresses. I've adjusted my part description file and seems to be behaving now!

I'm using AVR Studio 4.16 build 638.

Probably now in the wrong forum!

Thanks

John.

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

FYI Response from atmel:

Quote:

Dear customer,

XMEGA A Manual 19.12 page 228. All registers for TWI MASTER should have a value of 1 less than shown.

Correct would be:
CTRLA +0x00
...
DATA +0x06

Hope this can clarify this issue.