This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Vector Table for LPC1768 using C

Hello,
i am trying to write vector table for lpc1768 using c language. i have used the following code but the ISR is not executing.

// HW_REG is a macro to convert address value to pointer
#define HW_REG(addr) (*((volatile unsigned long *)(addr)))
#define NEW_VECT_TABLE 0x10006000
main()
{

SCB->VTOR = NEW_VECT_TABLE; // Relocate vector table to SRAM HW_REG(4*(7+16)) = (unsigned) EINT0_IRQHandler; // Setup vector NVIC_SetPriority(EINT0_IRQn, 0xC0); // Set IRQ#7 priority level to 0xC0 NVIC_EnableIRQ(EINT0_IRQn);
} kindly help me thank you in advance

Parents Reply Children
No data