Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

timer & watchdog togather

2005-08-30 by rohan patil

hi everybody 

i am using lpc2106 arm microcontroller. i am using iar
kickstart board for jtag debugging.
The timer interuppt & watchdog interrupts are
configured to fiq( timer interrupt has highest
priority assigned)
while debugging with jtag my code is running
perfectly(executing all interrupt functions) but when
i use the same code for standalone operation by flash
programming
its halting at starting of timer..
External interrupts are also not functioning in
standalone mode
please help to solve this problem......


initialisation sequence for timer & interrupt is as
follows


VPBDIV=0x1;
 MAMCR=0x02;
 
  MEMMAP = 2;
 LPC210xSystemInit();        // System initialization,
this will map the exception vectors
PINSEL0|=0x55550005; ();// Set up peripheral registers


 

 uartinit1();             /uart initialisation
uartinit0(); 
 

  __disable_interrupt();// First disable interrupts.
  
  LPC210xInitVIC();    // Setup interrupt controller.
  WDT_INT();// Watchdog 
   InitTimerInt1();             //timer interuupt init
 LPC210xInitTimer();      // Periodic timer
initialization.
.
.
__enable_interrupt();
LPC210xStartTimer();   // Start periodic timer.
  

initialisation code for timer interuppt & watchdog is
as follows


void InitTimerInt1()
{
  
  VICIntSelect &= ~VIC_TIMER0_bit; // IRQ on timer 0
line.
  VICVectAddr1 = (unsigned int)&TimerBeatmod;
/timerbeatmod is timer interrupt service function
VICVectCntl1 = 0x20 | VIC_TIMER0; // Enable vector
interrupt for timer 0.
  VICIntEnable = VIC_TIMER0_bit;    // Enable timer 0
interrupt.
  
}



WDT_INT()
{
WDTC=0x1ff;    /counter  value
  WDMOD=0x3;  /watchdog reset mode
}

vic  interrupt initialistion is as follows...


void LPC210xInitVIC()
{
  // Setup interrupt controller.
  VICProtection = 0;
  // Disable all interrupts but the one used for the
ROM monitor
  VICIntEnClear = 0xffffffbf;
  VICDefVectAddr = (unsigned int)&DefDummyInterrupt;

Regards....

  Rohan Patil
 



		
__________________________________________________________ 
How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos http://in.photos.yahoo.com

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.