ICE30 and/or AVR Studio 3.x causing incorrect program execut

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

Using the tools to emulate the ATmega32 part, I have encountered various situations where an instruction is executed incorrectly. Some examples follow (based on the trace output)

Example 1:
PmemAddr Instruction ImportantData Description
0x3244 RET 0x2442 address suppsed to return to
0x3242 don't care don't care i.e., execution continues from wrong address

Example 2:
PmemAddr Instruction ImportantData Description
0x2399 LDI R16,0x01 0x01
0x239A LDI R17,0x00 0x00 data set up
0x239B ST -Y, R17 0x00
0x239C ST -Y, R16 0x01 data put on stack
... some other processing to call a function ...
0x23A1 CALL 0x3583
0x3583 ST -Y, R25
0x3584 ST -Y, R24 preserve some registers
0x3585 LDD R24,Y+2 0x16
0x3585 LDD R25,Y+3 0x01 read the data put on stack at start of example

i.e. the value 0x0001 was put on the stack, but reading from the correct location resulted in the value 0x0116 being read. There were no interrupts or other stack accesses other than those shown.

Example 3:
PmemAddr Instruction ImportantData Description
0x245C LDS R16, 0x021F 0x0211 the instruction was supposed to read 0x21F but
when executed read 0x0211

All this code is from the same project which when run on an actual Atmega32 part has no errors in execution.
Has anyone else seen this type of problem, and if so, is there a solution?
(Note I have already upgraded the ICE30 and AVR Studio to the latest versions.)

Regards
Anttoni

admin's test signature
 

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

Hello Anttoni,

are you working with a phantom? mega32??

Greetings
Rolf :-)

admin's test signature
 

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

Hi Anttoni,

There is no part called ATmega32.

Regards,

Jacob L. Lassen
Field Applications engineer, AVR products, Atmel

admin's test signature
 

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

Hi Jacob,

if you are right, then there are too many bugs in Atmel's docs and tools :-)

Take a look into "STK500.ini" :
[DEVICES]
...
Device16=ATmega32

Take a look into AVRstudio "Releasenotes.txt" :
Problem: The ISC2 bit in the MCUCSR register for the ATmega32 IO-view was...
...ATmega32; The mask for the ADC leftadjusted result, low bits should be...

Run AVRstudio 3.22. Click the STK500 programming button. Select the ATmega32 as target.

Take a Hex-viewer and search in AVRstudio.exe for "mega32".

best regards
Rolf Hofmann
E-LAB Computers

admin's test signature
 

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

Atmel Atmel why are your people telling fairy tales ?

ATmega32 is not released, YES.
But info about ATmega32 was published on Atmel Russia website in Autumn 2000 already.

If I should believe the above announcement of mr. Jacob L. Lassen then the only way
I can interpret it is that mr Lassen has defenitive information that ATmega32 will never
be released. This is pretty strong announcment from and Atmel employee I would say.

So what's the story, Jacob?
Are you confirming that Atmel has dropped plans to release ATmega32 for good?
Or is it something else you wanted to say?
(do not say Atmel never had the plans, check our Atmel Russia website or ask some
one to translate if you cant manage the cyrillic alphabet)

And please dont start play hide-and-seek!
You made and confusing statement so its up to you to explain what you meant by that.

If ATmega32 is dropped than what AVR has JTAG and on-chip debug features?
Atmel is having DEMO of AVR's with JTAG on the US seminars, please use the
link to the seminars from www.atmel.com for info about this new exiting feature.

Folks you make me wonder big time.

One another Atmel FAE told me that Atmel is introducing ATmega163 with JTAG on US
seminars, can you believe that? I was surprised big time. Then I was even more surprised
when I did see an picture of that guy at the US seminar. He was at the seminar himself,
so there was no question that he DID KNOW that ATmega163 does not have JTAG, and
still he told me about ATmega163 with JTAG? I dont understand.

I am beaten. Totally beaten. I do not understand Atmel public relatiions.
To whom should I believe ?

mr Lassen who says: "There is no part called ATmega32" ?
that other guy who says "ATmega163 with JTAG" ?
info on Atmel Russia about ATmega32, 85, 104 ?
AVR Studio 3.21/3.22 (both having support for ATmega32) ?

the truth is out there somewhere, I guess :)

antti

admin's test signature
 

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

Hi,

and in addition to the first in this postings (anttoni) who says:

"when run on an actual Atmega32 part"

Now I believe he was dreaming or he read the "ATmega103" as an "ATmega32" but
I think a mega103 has 64 pins and a mega32 has 44. I'm sure he dreamed a wonderful
dream.

Rolf

admin's test signature