XMEGA D4 problem, TWIE not defined as specified

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

Hi, I order some cheaper alternative of A4 called D4. It says in the D4 spec sheet Section 19 that there are 2 TWI inteface, one is TWIC and another TWIE.

However, TWIE is not defined in D4's header file. I am using AVR Studio 4.18, gcc compiler.

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

I checked the *.inc for a xm16D4 and U R right. Did you tell Atmel ? If you didn't, you ought to and let them know THEY must fix their screwup... not you.

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

No, I haven't, do I get a refund for reporting the bug? I suppose they have someone checking this forum.
Anyway, I copy the TIWE's address and its interrupts definition from A4 to D4, but it didn't work.

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

What does Atmel has to do with GCC compiler?

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

I just put it there so people know I am using GCC not assembly for my code.

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

MBedder wrote:
What does Atmel has to do with GCC compiler?
The *.inc and *.h files are both made by Atmel.

ClearSky1494 wrote:
Anyway, I copy the TIWE's address...
You have to do it just as they did for TWIC, but with the addresses for TWIE... happy trails. :(

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

Quote:

The *.inc and *.h files are both made by Atmel.

Not entirely true. It's true that Atmel's XML files start the process of .h generation but it is part of the AVR-LibC build.

The "fault", however is with Atmel this time:

C:\Program Files\Atmel\AVR Tools\Partdescriptionfiles>grep TWIC ATxmega16D4.xml
                        
                        
                                

C:\Program Files\Atmel\AVR Tools\Partdescriptionfiles>grep TWIE ATxmega16D4.xml
C:\Program Files\Atmel\AVR Tools\Partdescriptionfiles>

But is it possible that there's an errata for the D4 that says it was supposed to have two but after a (typical) Atmel cock-up only one works?

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

clawson wrote:
But is it possible that there's an errata for the D4 that says it was supposed to have two but after a (typical) Atmel cock-up only one works?
This was copied from the 2010-Dec XMega D4 datasheet:
27. TWIE is not available
The TWI module on PORTE, TWIE is not available
Problem fix/Workaround
Use the identical TWI module on PORTC, TWIC instead.

"Dare to be naïve." - Buckminster Fuller

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

That is really nice, after describing TWIE in good length in previous sections and come up with "TWIE not available" in the errata in this month, right after I ordered them.
Its getting very creepy, its like from now on, you see some function description in the data sheet, you have to look up FUTURE errata to see if its actually available. What will be next not available, USART, TIMER, or SPI?

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

Then... TWIE NEVER existed from the jump and they lied in the original datasheet ?! Doesn't seem to me like it WAS on the MCU and for some reason they couldn't get it to work. I don't get it or them.

Thanks freaks ( at least my 'A3s have it as advertised )

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

The datasheets are surely written in advance of the chip implementation as part of its design docs? They then design the logic to implement what was planned. Like the hardware and software we make/write, mistakes are made from time to time and, when it's finally implemented, faults may be found and hence some previously hoped for features cannot be offered. Surely this is normal for all silicon design? I don't think I've come across silicon that did not have an "errata".

One question - why two TWI's anyway? I thought one alone could support 127 devices?

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

Quote:
One question - why two TWI's anyway?

That's something I asked here:

https://www.avrfreaks.net/index.p...

I don't see that the multiple peripherals on an MCU was really answered. The only good reason I could see it would be useful is if each had TRUE DMA.

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

clawson wrote:
The datasheets are surely written in advance of the chip implementation as part of its design docs? They then design the logic to implement what was planned. Like the hardware and software we make/write, mistakes are made from time to time and, when it's finally implemented, faults may be found and hence some previously hoped for features cannot be offered. Surely this is normal for all silicon design? I don't think I've come across silicon that did not have an "errata".

But:

- Why do Atmel's erratas "always" come so late?

One reason I can't take the Xmegas serious is from when I played with the 128A1 on the Xplain. Literally every non-trivial function I first touched didn't work according to the manual. Month or a year later there was suddenly an errata stating "ups, it is broken".

Don't tell me Atmel didn't know much earlier that, e.g. they didn't have calibration values in the calibration row (is that even mentioned in the errata?), or that there is something fishy with the ADC and DAC. Or that the DFLL is broken (note that DFLL examples were suspiciously absent from Xmega clock system application notes, bastards).

I don't trust Atmel at all when it comes to Xmega errata. I wouldn't be surprised if they still haven't told us all issues, because some markedroid is shitting his pants.

- Why can't they add a reference in the corresponding chapter that there is an errata for that specific periphery? Or even cut the chapter out, like when TWIE is not available? To complicated for the interns writing the errata?

And BTW, occasionally telling the intern that he should use the spell checker when writing errata would also be a good idea.

Stealing Proteus doesn't make you an engineer.

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

Its not about have 2 TWI working at the same time but more about flexibility. Maybe the TWI pins in PORTE is closer to the actual TWI lines, or TWIC is more convenient for something else, etc. Even in some cases, one TWI is used as master and the other as slave on two different TWI buses.

Its not about have an errata, its more about customer trust. Have Ateml's original advertisement for D4 less aggressive and made sure the parts working as designed, none of us will have to loose time and money. Now I have reordered a batch of A4 just to fix this error(either that or throw away my batch PCB), how much confidence do I have if Atmel doesn't come up with "TWIE not working" or something else of that nature in next month's errata?

I assume D4 was designed after A4, then it must be the case the D4 has some parts subtracted from A4 to reduce cost. Now it seems Atmel has gone too far in this process (assuming A4 has a working TWIE).

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

Quote:

either that or throw away my batch PCB

Why on earth did you go as far as PCB production without even getting a single sample of the silicon to be used? Doesn't anyone ever make prototypes first these days?

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

I did, but on A3 chips, switch to A4 to reduce cost and size. Had I known such problem existed...

This project is already overdue, it was originally designed for A4, then A4 was out for quite a while and swapped to A3, now A4 is back so swapped back.

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

right, we just bumped into the TWIE issue on a D4. Is this fixed already? We have the same issue with a D3.

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

Moderator

Perhaps this topic should be moved to the Xmega Forum.

JC

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

Quote:

right, we just bumped into the TWIE issue on a D4. Is this fixed already? We have the same issue with a D3.

Tell more about how you "bumped into the TWIE issue on a D4". I looked in the datasheet for the D$, and the errata of TWIE is not listed after chip rev. A/B. (What chip rev are you using?)

I have an install of Studio6 (build 1938 SP1). The 'D4 .XML, the .INC, and the GCC .h all list address, registers, and vectors for TWIE.

Now, the same files for 'D3 do not mention TWIE. But look at the datasheet for the 'D3: The latest listed chip rev. is E, and the errata states

Quote:
TWIE is not available

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
Quote:

right, we just bumped into the TWIE issue on a D4. Is this fixed already? We have the same issue with a D3.

Tell more about how you "bumped into the TWIE issue on a D4". I looked in the datasheet for the D$, and the errata of TWIE is not listed after chip rev. A/B. (What chip rev are you using?)

I have an install of Studio6 (build 1938 SP1). The 'D4 .XML, the .INC, and the GCC .h all list address, registers, and vectors for TWIE.

Now, the same files for 'D3 do not mention TWIE. But look at the datasheet for the 'D3: The latest listed chip rev. is E, and the errata states

Quote:
TWIE is not available

My mistake the bump was on a D3, the new version of the prototype will probably have a D4 as does an other prototype.

When designing the board I didn't read the errata's as I wouldn't expect such a dramatic errors in the specifications of the MCU.

I've checked the datasheets of D4 and I saw the note that TWIE is not available. Reading pdf's on a tiny screen is not a good idee it seems. I missed the part about "rev A/B".

Any news if this error will be fixed for D3's? I hate bitbanging communication channels.

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

(moderator--this continuing thread might get a better audience for jan_dc if moved to the Xmega forum?)

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

AAAHHH OK...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly