hi, hui:
Thanks for your help.
My code whether in boot or in MainApp, it will do remap interrupt vectors in ram.The interrupt inveter works fine in boot and main.
I think you misunderstand me. In boot, I donot use PIT. In MainApp, I do use PIT.
My question is: I shut down primask in MainApp, the primask have power to shut down PIT interrupt. Why when the code from boot goto mainApp, it will get into boot's vector? It has no reasonable.
By the way, the pdf show's code has a problem. It is not 0x400, will be 0x410
/* Copy the vector table to RAM */
if (___VECTOR_RAM != ___VECTOR_ROM)
{
for (n = 0; n < 0x400; n++)
___VECTOR_RAM[n] = ___VECTOR_ROM[n];
}