Speed up AVR Studio simulator

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

Is there any way to speed up the AVR Studio simulator? I would like to debug a Timer interrupt routin, which occurs in every 1 sec @ 20 MHz crystal clock. I set the brakepoint, push the run button, and then I wait for a looong loooong time... Because obviously as the frequency increases the count of calculated steps increases also. But if I set the simulator to high frequency like 20 MHz it gets so slow that I hardly can wait for it. 1 sec delay on the PC takes about 1 minute.

I found out a small trick, that I set the simulator clock frequency for example on 2 MHz, which will cause the simulator running faster, but all the timigs wrong by a factor 10.

The power of my PC should be enough as it is a Core 2 Duo processor machine. It could handle a LOT MORE than this.

So is this something we have to live with, or are there any recomodations to increase speed? I'm not expecting real time but something little mor efficient.
(Though it should be possible to simulate a 8 bit 20MHz microcontroller on a Dual core 32 bit Pentium at 2.5 GHz in real time or even faster :) ),

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

The speed setting's only use is for calculating the stopwatch value - it doesn't affect the speed of the simulation. That's always going to be about 100 to 1000 times slower than the real thing.

If building code to be simulated the best bet is to change our timing/delay settings to some value that's maybe /64 or /100 of real life and use that only for the simulator.

Bottom line, yes it is something you just have to live with.

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

Or you can simulate in teal-time using for example JTAG. It’s much faster.