RTC example on ARM7 LPC2148 using WinARM

Finally got my LPC2148 RTC working on my development board. arm7 base development board for lpc2148 I am quite new to ARM microcontrollers, so I managed to make few tests using them by driving some peripherals and writing some test routines. First code I tried was simple LED blink program first lpc2148 arm7 microcontroller test led blink This one is running microcontrollers real time clock (RTC) and generating interrupts every second. When Interrupt occurs microcontroller sends particular message to UART that I could see via Terminal program. The main program: /****************************************************************************** * * WinARM RTC application * * – UART0 send in Interrupt-Mode * – Sends message every seccond. * – RTC interupt every second ******************************************************************************/ #include “types.h” #include “LPC214x.h” #include “config.h” #include “armVIC.h” #include “uart.h” uint32_t time_toggle=0; static void rtc0(void) __attribute__ ((interrupt (“IRQ”))); static void lowInit(void) { // set PLL multiplier & divisor. // values computed from config.h PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL; // enable PLL PLLCON = PLLCON_PLLE; PLLFEED = 0xAA; // Make it happen. These two updates PLLFEED = 0x55; // MUST occur in sequence. // setup the parallel port pin IO0CLR = PIO0_ZERO_BITS; // clear the ZEROs output IO0SET = PIO0_ONE_BITS; // set the ONEs output…

Continue reading