simulavr  1.1.0
hwtimer.cpp File Reference
#include "hardware.h"
#include "avrdevice.h"
#include "hwtimer/timerprescaler.h"
#include "hwtimer/hwtimer.h"
#include "helper.h"
#include "systemclock.h"
#include <cstdlib>
#include <time.h>

Go to the source code of this file.

Variables

const int HWTimerTinyX5_nextdelay [8] = { 16, 15, 16, 16, 15, 16, 15, 16 }
 Step time in ns for async clock by pll. More...
 

Variable Documentation

◆ HWTimerTinyX5_nextdelay

const int HWTimerTinyX5_nextdelay[8] = { 16, 15, 16, 16, 15, 16, 15, 16 }

Step time in ns for async clock by pll.

Because system clock steps are counted in ns, we have to calculate so many steps to get over all steps a time in ns without fraction. For 64MHz, e.g. 15,625 ns period, this step time without fraction is 125ns, e.g. 8 different steps. For LSM mode and 32MHz we take every 2 values together for one step.

Definition at line 1317 of file hwtimer.cpp.

Referenced by HWTimerTinyX5::Step().