AVR Studio--Simulator anomalies?

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

Hello, and TIA--

I have noticed several anomalies with using the simulator under AVR Studio. I have just verified the behavior under the new 3.22 version. Perhaps someone can help?

1) I have never been able to get the EEPROM to load into the memory window or have my program access the values set during assembly. The values are set properly, the .eep file is created, and programming and operation of the real device is fine. How can I get my EEPROM image into the simulator?

2) When starting a program in the simulator, all the registers do not have a zero value. Zero at reset is stated in the data sheets, and I have verified this during real operation. Does anyone know why the simulator does not do this operation?

Thanks.

Lee Theusch

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

1) To put the .eep file into EEPROM; use the UPLOAD/DOWNLOAD memories option in the FILES menu.

2) Actually the simulator behaves correctly :)
When you power up an AVR device(cold reset), the register contents should be regarded as uninitialized. Although you may read 0 in most of them, there is no guarantee by design that the contents will be 0 or 1. (The IO registers will be set to their initial value)
After a warm reset, WDR, or wake up from sleep the 32 GP-register contents will be unchanged.

rgds
Arild
Atmel AVR support team

admin's test signature
 

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

The Up/Download memories can also be used to preserve EEPROM files between simulations, although manually. Store the EEPROM contents to file before you end a simulation session and write it back immediately after you have started a new simulation session.

Dr.M

admin's test signature
 

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

Thanks! The information is much appreciated.

1) I was sure that there must be a way to load the EEPROM into the simulator, but couldn't find it, nor a reference in the Help. It makes it MUCH easier with EEPROM loaded. :)

2) We were sure that we remembered a reference to registers being zeroed at RESET, but surely cannot find it after you posted. This will help to ensure reliable application integrity.

Thanks, Arild!

lht

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

Regardless of what Cliff says, I can out-necromancy him, and with one of my >>own<< posts as well.

Lee

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

Oh bugger, then thread numbers are not issued in chrono order?

(and this was just 3 hours away from the one I found too :( )

EDIT: I just noticed that it is exactly 7 years to the say too.

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

Actually, by your rules you still win--you use the date of the last reply as the benchmark.

[so now I have to dig again...]

Lee

(lol -- see my newbie questions!)

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

Lee,

See something Tuomas just added to the resurrected thread in GCC!

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

Lol--we'll leave that site intact for the anthropologists, eh, Tuomas.

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.