EasyManua.ls Logo

NXP Semiconductors PXN2020 - Page 504

NXP Semiconductors PXN2020
1376 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Periodic Interrupt Timer (PIT)
PXN20 Microcontroller Reference Manual, Rev. 1
22-10 Freescale Semiconductor
Timer 8 is used for triggering only. Timer 8 is started by writing a 1 to bit TEN in the TCTRL8 register.
The following example code matches the described setup:
// turn on PIT
PIT_REG_P->pit_CTRL = 0x00;
// Timer 1
PIT_REG_P->pit_LDVAL1 = 0x0003E7FF; // setup Timer 1 for 256000 cycles
PIT_REG_P->pit_TCTRL1 |= 1<<1; // enable Timer 1 interrupts
PIT_REG_P->pit_EN |= 1<<1; // start timer 1
// Timer 8
PIT_REG_P->pit_LDVAL8 = 0x0016E35F; // setup timer 8 for 1500000 cycles
// timer 8 can’t generate interrupts -> no settings needed for trigger
PIT_REG_P->pit_EN |= 1<<8; // start timer 8

Table of Contents

Related product manuals