Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: interrupt lost (all)

2005-11-29 by Richard Duits

Make sure the startup code has the instruction at address 0x18:
ldr    pc, [pc, #-4080]

Richard Duits.



ualbe wrote:

> Dear Ake,
> I tested your VIC sequence but it still doesn't work.
> I'm reading my code but It seem correct.
> Here it is an example
> thanks
>
> Alberto
>
> static init(void)
> {
>     // Init Vector Interrupt Controller
>     VICIntEnClr = 0xFFFFFFFFL; // Disable all Ints
>     VICIntSelect = 0x00000000L;
>    
>     // Install Default IRQVec
>     VICDefVectAddr = (unsigned long) DefaultISR; // set interrupt
> vector
>    
>     // Initialisation of CAN interfaces
>     // CAN interface 1, use IRQVec0, at 125kbit
>     CANAll_Init(1,0,CANBitrate125k_60MHz);
>    
>     // CAN interface 2, use IRQVec1, at 125kbit
>     CANAll_Init(2,1,CANBitrate125k_60MHz);
>    
>     // Set CAN Err ISR to IRQVec2
>     CANAll_SetErrIRQ(2);
>    
>     // Initialize Timer Interrupt
>     T0MR0 = 5999; // 100 microseconds = 6.000-1 counts
>     T0MCR = 3; // Interrupt and Reset on MR0
>     T0TCR = 1;  // Timer0 Enable
>    
>     // Set Timer0 ISR to IRQVec3
>     VICVectAddr3 = (unsigned long) Timer0ISR; // set interrupt vector
>     VICVectCntl3 = 0x20 | 4;  // use it for Timer 0 Interrupt
>     VICIntEnable = 0x00000010;  // enable Timer0 Interrupt
>
> }
>
> void Timer0ISR (void)
> {
>   gTimerTick++;
>   T0IR = 1; // Clear interrupt flag
>   VICVectAddr = 0xFFFFFFFF; // Acknowledge Interrupt
> }
>
>
>
>
>
>
> 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.