I am currently developing a little program to toggle GPIO pins. I am using KDS 3.0 and KSDK 1.2 with the TWR-K53N512 board. I am quite new in working with Freescale's MCUs. To toggle a GPIO pin is no problem but to time it with an interrupt is more complex. I want to use the LPTMR0 for this purpose.
My colleague gave me some code he used with another Freescale MCU and CW. Here is the part that makes problems:
static void IRQ_enable(uint32_t irq)
// Enable IRQ in NVIC
div = irq / 32u;
NVIC_ICPR0 |= 1 << (irq % 32u);
NVIC_ISER0 |= 1 << (irq % 32u);
NVIC_ICPR1 |= 1 << (irq % 32u);
NVIC_ISER1 |= 1 << (irq % 32u);
NVIC_ICPR2 |= 1 << (irq % 32u);
NVIC_ISER2 |= 1 << (irq % 32u);
The problem is I do not find the NVIC registers. I know they are there according to the ARM website but they are not in the MK53D10.h file and there is no sysinit.h. The compiler, of coarse, says NVIC_ISER0 etc. are not declared. Anyone can help me? I guess its a simple solution. Thanks in advance!