Content originally posted in LPCWare by jharwood on Mon Mar 21 22:08:42 MST 2011
Quote: Albert
Hi all,
I tried to use the function NVIC_SetVectorTable( ) but the LPCXpresso IDE point a error. Someone can explain why?
Code:
#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif
#include <cr_section_macros.h>
#include <NXP/crp.h>
#include <NXP/LPC17xx/nvic.h>
void main ( )
{
NVIC_SetVectorTable(NVIC_VectTab_RAM,0);
...
}
I'm not sure in which library NVIC_SetVectorTable is actually implemented, so I was going to suggest using SCB->VTOR = instead. But then you edited your post...
Quote:
Other question is,
If I use the instruction SCB->VTOR = 0x20000000; instead of NVIC_SetVectorTable(NVIC_VectTab_RAM,0);, why I don't see on 0x1000 0000 to 0x1000 0100 any change?
Thank!
So now the plot thickens :)
Why would you want to set the vector table offset register to 0x20000000 :confused: That is a reserved area in LPC17xx
Perhaps you want to move the vector table to AHB SRAM ? that starts at 0x2007c000
Why would you expect to 'see a change' (in memory at 0x10000000 ?) when you modify the VTOR ?
It's up to you, the programmer, to correctly populate the vector table in your chosen new location then modify the VTOR.