15 SIM->SCGC6 |= SIM_SCGC6_PIT_MASK;
32 PIT->CHANNEL[0].LDVAL = PIT_LDVAL_TSV((
F_BUS / 1000000) * (uint32_t)us);
41 PIT->CHANNEL[0].TCTRL = PIT_TCTRL_TEN_MASK;
44 while(!(
PIT->CHANNEL[0].TFLG & PIT_TFLG_TIF_MASK));
47 PIT->CHANNEL[0].TCTRL = 0x00;
K60 clock configuration defines.
#define SIM
Peripheral SIM base pointer.
#define F_BUS
Bus frequency resulting from the chosen divisors and multipliers.
void udelay(uint16_t us)
Microsecond busy wait.
K60 hardware register header wrapper.
#define PIT
Peripheral PIT base pointer.
#define BITBAND_REG(Reg, Bit)
Macro to access a single bit of a peripheral register (bit band region 0x40000000 to 0x400FFFFF) usin...