Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] timer & watchdog togather

2005-08-30 by Gary Greene

Hi Rohan,

In a quick read of your code, I hope you commented out the

MEMMAP = 2;

For the Flash version, 2 is for re-map of vectors to RAM.

- Gary Greene

rohan patil wrote:
> 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
> 
> 
> SPONSORED LINKS
> Microprocessor 
> <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=tsVC-J9hJ5qyXg0WPR0l6g> 
> 	Microcontrollers 
> <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=DvJVNqC_pqRTm8Xq01nxwg> 
> 	Pic microcontrollers 
> <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=TpkoX4KofDJ7c6LyBvUqVQ> 
> 
> 8051 microprocessor 
> <http://groups.yahoo.com/gads?t=ms&k=8051+microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=1Ipf1Fjfbd_HVIlekkDP-A> 
> 
> 
> 
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
> 
>     *  Visit your group "lpc2000
>       <http://groups.yahoo.com/group/lpc2000>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        lpc2000-unsubscribe@yahoogroups.com
>       <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
> 
> 
> ------------------------------------------------------------------------
>

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.