AnsweredAssumed Answered

Where is the "vector table"??

Question asked by Justin Abraham on Oct 19, 2009
Latest reply on Oct 22, 2009 by Justin Abraham

So yesterday i got a new gadget to play with, the M52235EVB with the MCF52235 chip. I've managed to load it with the sample code and run it successfully. I also managed to configure the GPIO and make the LEDs flash, yay considering I'm a complete newbie to Freescale :smileyhappy: .

 

The I proceeded to look into using an external interrupt to switch an LED on. The EVB has switches connected to IRQ1, IRQ4 and IRQ11. So i decided to configure IRQ4 (Switch 1). Based on all the reading I've done on the questions asked in the forum and the Reference Manual the code below should work:

 

 


void ini_interrupts(){ // Setup pin as IRQ4 pin MCF_GPIO_PNQPAR = 0 | MCF_GPIO_PNQPAR_IRQ4_IRQ4; // Set the type of signal level MCF_EPORT0_EPPAR = 0 | MCF_EPORT_EPPAR_EPPA4_LEVEL; // Enable IRQ4 MCF_EPORT0_EPIER = 0 | MCF_EPORT_EPIER_EPIE4; // Define the interrupt prioirty and level for IRQ4 MCF_INTC0_ICR04 = 0 | MCF_INTC_ICR_IP(4) | MCF_INTC_ICR_IL(4); // Unmask IRQ4 MCF_INTC0_IMRL = 0 | ~(MCF_INTC_IMRL_INT_MASK4|MCF_INTC_IMRL_MASKALL);}

 

 So i've set the pin to IRQ4, set the signal level, enabled IRQ4 and unmasked it. Now i need to add the handler subroutine in the interrupt table "vectors.s"...so here's the problem, where do i find this file?? Searched for it but can't find it. How do i create a new one. Any help would be appreciated, thank you.

Outcomes