cancel
Showing results for 
Search instead for 
Did you mean: 

Another STVD7 Query

sjo
Associate II
Posted on August 05, 2003 at 07:30

Another STVD7 Query

2 REPLIES 2
sjo
Associate II
Posted on July 31, 2003 at 11:54

Just another query regarding the simulator:

I have noticed that in the known problems in the release notes for v2.53 that it states:

The time displayed in the Time tab of the ST7 registers window is not computed using the CPU frequency but the Fosc frequency.

This does not follow with the actual simulator eg.

16MHz Fosc (Normal run mode) which is 8MHz internal (125ns instruction cycle time).

Therefore a NOP should take 250ns @ 16MHz Fosc - the simulator gives 125ns.

This suggests that the simulator is actually using the Fcpu rather than the Fosc.

Regards

SJO
alain2399
Associate II
Posted on August 05, 2003 at 07:30

The release notes apparently do not explains the pb clearly.

* The simulator uses clock ticks for timing every instructions and uses only one value for the period of those ticks. This value is calculated using Fosc given in the MCU configuration window.

* Most of the time, obtaining Fcpu from Fosc is simply a divide by 2. But not on all micros (it can be divided by 3 or other factors if some PLLs exist) and it can be changed by the WAIT or HALT mode.

So you are right there is an error in computation of the CPU tick duration for most of the cases, but further more this will not give the correct time for all the cases.